Is getting a function by it's function name in IOS illegal?

I read the Limitations of IOS.

http://docs.xamarin.com/guides/ios/advanced_topics/limitations#2.no-dynamic-code-generation

In the section - No Dynamic Code Generation,

it mentions : No support for creating types dynamically (no Type.GetType (“MyType`1”)),

so I wonder the illegal of my method to get a function by it’s name.

Below code is how I get a function by it’s name.

class MyType
{
	public static int Func( int I)
        {
		return I + 3;
	}
}

int result = (int)typeof(MyType).GetMethod ("Func").Invoke (null, new Object[]{4});

Is this code illegal in IOS?

Its only a single funtion of the Reflection Library, Emit().
So, as long as you’re not using it, it shouldn’t be a problem.

Another problem would be accessing private apis of ios this way. I don’t know exactly how it works but if you call any private function apple will reject your app in the review process.

By the way, if you just want to call a method of another class, try to use the Invoke()function, it works also on private or protected methods from outside.