vb.net - Reading Object's Memory Address -
I am trying to pass a business object in a different format to modify it with a winform, and then the text With the updated values of boxes, etc. again on the first form.
However, it appears that the object values defined in the second form are not "sticking", when code control returns to the first form.
Is there a way to look at the location of objects in VB.NET? I first want to make sure that on the second form the object variable is pointing to the same memory address as the object on the first form. Then I will take it from there.
In a separate VB project, I pass a simple object in a different format, amend the values, and display the value of the object again in the first form. It worked fine in my actual app, I am passing an object that is the property of another object, which may be why it is not working.
Solution: The problem was that I was using a DPC () function that made it easier to copy the properties of an object in another, to remove that function and to replace the second form (eg. Property1 = searchResult.property1) Manually set the passed object all behaves as expected.
You can not see the object's memory address in VB.NET.
Can you show us a little code? We may be able to find this error.
What type of object are you passing? If the object is a value type, it will not work (declared by the structure instead of class).
Comments
Post a Comment