In case it's useful to really see there is no difference between string
and System.String
:
var method1 = typeof(MyClass).GetMethod("TestString1").GetMethodBody().GetILAsByteArray();var method2 = typeof(MyClass).GetMethod("TestString2").GetMethodBody().GetILAsByteArray();//...public string TestString1(){ string str = "Hello World!"; return str;}public string TestString2(){ String str = "Hello World!"; return str;}
Both produce exactly the same IL byte array:
[ 0, 114, 107, 0, 0, 112, 10, 6, 11, 43, 0, 7, 42 ]