does MT support Guid.Parse()?  It appears to have been introduced in .NET
4.0, and I don't think MT supports many 4.0 features yet

you can achieve the same thing by passing a string into Guid's constructor,
so you can probably add a special case to handle this

On Mon, Jul 9, 2012 at 10:14 AM, eclipsed4utoo <[email protected]> wrote:

> 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
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to