Questions tagged [object-reference]

An Object reference is a pointer to an object stored in memory. The main difference is that the object was previously created (via a new operator, for instance) and its reference is kept via an additional variable, that is, its object reference.

An Object reference is a pointer to an object stored in memory. The main difference is that the object was previously created (via a new operator, for instance) and its reference is kept via an additional variable, that is, its object reference.

More Info

325 questions
-1
votes
1 answer

How to store references of other objects of class in the same class?

I have experience with classes but i am a little confused here. The problem is that it says store reference of the other Objects of class also in the class object. I am putting the code i wrote below. Kindly guide me on how to solve the…
-1
votes
2 answers

Recursively iterating through nodes referenced by other nodes

How could I recursively iterate through nodes with reference to a previous node? Expecting output 4,3,2,1 in the example below: class Node: def __init__(self, parent, value): self.parent = parent self.value = value def…
Ivan
  • 59
  • 1
  • 9
-1
votes
1 answer

Accessing a Lazy-Loaded field... Object reference not set to an instance of an object

I am sure I am just missing something basic so hope I can get my question across clearly. I have a class named ItemData which implements an interface IITemData. Within the class ItemData I have the following: However when I am trying to use this…
CJH
  • 1,266
  • 2
  • 27
  • 61
-1
votes
1 answer

Python: Two objects seem to be referencing the same variable even though I do not have any explicit connection between them

I am trying to change an octet based on the mask I have. Lets say I have IP: 194.216.35.54 and mask- 27, I need to change the 4th octet (3 when counted from 0). I am trying to change the values in the work_octets variable. But, somehow, the values…
vamsi465
  • 15
  • 1
  • 7
-1
votes
1 answer

Does deleting an key from Object creates/returns new Object?

I need to delete an property/key from one object comparing the other as in the below example var Obj1 ={ a : '1', b : '2', c : '3', d : '4' } var Obj2 ={ a : '1', b : '2', d : '5' …
Uthistran Selvaraj
  • 1,371
  • 1
  • 12
  • 31
-1
votes
2 answers

debugging error on nullreference

Debugging error on Nullreference I get this error when debugging my program: System.NullReferenceException: 'Object reference not set to an instance of an object.' Code below is the one that throws the error and I totally have no idea how to fix…
-1
votes
1 answer

How to force eclipse to create different object references

i am trying to create all subsets of a set and group them without duplicates. For example, in a set like {1,2,3,4,5,6}, {(1,2), (3,4), (5,6)} this tuple can be valid on the other hand {(1,2), (2,4), (5,6)} this tuple shouldn't be valid since it has…
-1
votes
1 answer

Menu item setTitle

I would like to change the title of an item in a menu, but I get an error, here is the log: E: FATAL EXCEPTION: main Process: com.locateit.antholife.locateit, PID: 18329 java.lang.NullPointerException: Attempt to invoke interface method…
-1
votes
1 answer

Object Reference Not Set Error on C#

I new to Visual C# and just wanted to create a tiny CLI-based application. With the written codes below, I am receiving this error: "Object reference not set to an instance of an object.". Obviously, since I'm a noob, I have no idea how fix the…
-1
votes
1 answer

Clean way to catch error Object reference not set

When DeliveryMethodComboBox has no selectedItem, the Object reference not set to an instance of an object. error appears. what is the best way to solve this? In this example i've added a try and catch. try { DeliveryMethodLabel2.Text =…
JP..t
  • 575
  • 1
  • 6
  • 28
-1
votes
1 answer

"Object reference not set to an instance of an object", when the variable is defined?

EDIT: I found the error. I was setting the elements in the wrong place, and then calling their XPath in the right (different) place. I'm trying to get values of XML elements inside of another XElement, and when I try to get the value using XPath,…
Dominoed
  • 123
  • 3
  • 15
-1
votes
1 answer

NullReferenceExceptionUnhandled

I'm writing a blackjack program but my problem is what's the solution when creating an object that has a list of other objects, but when I create the object at first, the list is empty. I think that's why I'm getting this error. Below is my code…
-1
votes
2 answers

Still Need Help! The best overloaded method match for 'XDevkit.IXboxDebugTarget.GetMemory(uint, uint, byte[], out uint)' has some invalid arguments

Possible Duplicate: The best overloaded method match for 'XDevkit.IXboxDebugTarget.GetMemory(uint, uint, byte[], out uint)' has some invalid arguments Not sure why this is being voted down, I just need help. I have been struggling with this for…
-2
votes
1 answer

a javascript Object reference bug

I meet a bug like this: let needUploadFiles: string[] = [], needUploadPages: Filmstrip[] =[], needUploadContents: string[] = []; Win.dataSource.filmstrips.forEach((filmstrip: Filmstrip, index) => { …
-2
votes
2 answers

Why is this object reference supposedly not set to an instance of an object that has obviously been identified by the compiler?

Some people -- perhaps gullibly -- believe that there are multiple ways of being a catskinner. When my attempt to search all the Controls on a Page for Checkboxes continued to fail ignominiously (for proof of that, see this), I thought maybe I could…
1 2 3
21
22