Good day all,
I am struggling to determine what's the issue with an attempt to access a public property on a class.
My need is very basic. I have a public class that's correctly instanced in my routine, and I know, thanks to reflector, that this class has a property that I need to reference.
Problem is, the property is defined as thus:
public Vector3 root {
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get;
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set;
}
The problem I'm facing is that all my attempts at getting the property simply fail. I've instanced the Type, and tried with all possible combinations of binding flags
Type vtype = myobj.getType()
PropertyInfo[] vproperties;
vproperties = vtype.GetProperties();//(BindingFlags.Default | BindingFlags.CreateInstance | BindingFlags.Instance | BindingFlags.NonPublic);
for (int vpropertycounter =0 ; vpropertycounter < vproperties.Length ; vpropertycounter++) {
Console.write( varbodyproperties[varpropertycounter].Name); <= 'root' never appears in this list
}
My suspicion and doubt revolves around the fact that the root property might not be 'visibile' because its getter and setter are 'wrapperless' and 'internal'. Sadly I don't know if this can be overcome or not.
I would like to know if this property can by all means be accessed, and possibly how to do it.
All feedback is welcome.
Thanks in advance.
NOTE: addressing the property directly, as in "myobj.root" generates a compiler error for unknown property.