What I’ve tried:
public class TestClass{
public int a = 555;
public static int sa = 666;
}
public static class Program
{
public int Main(int argc, AnsiChar** argv)
{
var type = typeof(TestClass);
var field_a = class_getInstanceVariable(type, new AnsiChar[]{'a','\0'});
var field_sa = class_getInstanceVariable(object_getClass(type), new AnsiChar[]{'s','a','\0'});
NSLog("%s, %s\n", ivar_getName(field_a), ivar_getName(field_sa));
// actual log: a, (null)
// expected: a, sa
}
}
I’ve also tried to dump all fields/properties/methods of the class and its meta class, but still can’t find where the “static field” is.