In my reflection code i hit a problem with my generic section of code. Specifically when i use a string.
var oVal = (object)\"Test\"; var oType = oVal.GetType();
You are trying to do this :
var sz = new string();
Try to compile it, you will understand your error.
You may try :
var sz = Activator.CreateInstance(typeof(string), new object[] {"value".ToCharArray()});
But it looks useless, you should directly use value...