Access to seemingly public property through reflection

Good day,

I am trying to determine what the problem is with trying to access a public property in a class.

My need is very simple. I have an open class that correctly installed my routine, and I know, thanks to the reflector, that this class has a property that I need to reference.

The problem is that the property is defined as follows:

public Vector3 root {
    [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get;
    [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set;
}

The problem I am facing is that all my attempts to get a property just fail. I set 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
}

, root "", " " "". , , .

, , , , .

.

.

: , "myobj.root" .

+4
1

MethodImplOptions.InternalCall . ( ).

, - Word API, VB. , setter,

 Property = "" <- doesn't work
 set_Property("") <- works

API, , ,

, ,

+1

All Articles