I have a simple function:
public string getType(object obj) {
Type type = obj.getType();
return type.FullName;
}
If you use this function on a string object, which was created on runtime, the function returns "System.RuntimeType"…
But it should return "System.String"…
If you call it like this –
It will return
System.StringBut if you call like this –
Then it will return
System.RuntimeTypeAlso, there is small
typoin your method –Type type = obj.getType();should beType type = obj.GetType();