I am trying to use reflection to create a generic method for converting an
object value to a specified type.
public T ConvertTo<T>(object value)
This seems to work fine in MonoTouch for almost every type, except for Guid.
When I use this code...
Type myType = typeof(Guid);
MethodInfo method = myType.GetMethod("Parse", new[] { typeof(string) });
T newValue = (T)method.Invoke(null, new[] { value });
'method' is null. This works fine in .Net 4.0, so I am not sure what the
problem is.
I've also tried "ParseExact", but I get the same error. Any help?
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/Guid-Parse-doesn-t-seem-to-exist-with-Reflection-tp4655870.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch