1

I have a purchased VB.Net class with very bad documentation and I'm trying to understand how it works.

I executed some code and came up with a variable X(0) as shown in Visual Studio 2010 watch window :

Debugger

X(0) has some properties I would like to access : CustomPropertyStore.

I did

X(0).CustomPropertyStore(0) 

to get the first value but but it's throwing an error:

Public member 'CustomPropertyStore' on type 'BasePersistentClass' not found.

How come that, "CustomPropertyStore" is shown as a property of object X(0) and it's inaccessible ?

Thanks

1 Answer 1

0

In the Visual Studio watch window, you can expand an object and see its properties. If you try this on your object, you will be able to see if this property is there or not.

Also, judging by the error, it seems like the property you are trying to access is possibly a member of a subclass of X. If this is the case, try something like this in the watch window (this is C# syntax, sorry I'm not sure of the VB syntax):

((MySubClassType)X(0)).CustomPropertyStore

If the member is private, you will not be able to call it directly from the watch window.

3
  • That's what I did. I expended the object X(0) and found the property 'CustomPropertyStore' wich I need in the code. That means that the property is there, isn't ? But when I do X(0).CustomPropertyStore it throws an error. Nov 11, 2013 at 4:33
  • It is hard to see from the screen shot, but is the member public?
    – rhughes
    Nov 11, 2013 at 4:35
  • If it was not public, I wouldn't have been able to see it in the watch window no ? (the full size image can be seen by downloading it) Nov 11, 2013 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.