[Mono-list] GetMethodFromHandle and NotImplementedException

Carlos Ble ble.jurado at gmail.com
Sat Jul 21 05:52:06 EDT 2007


Thanks Gert!
Ok Miguel, I will do so next time.
I have real and open source code using that feature at
http://svn.berlios.de/svnroot/repos/boxerp/trunk/src/client-lib/
It could be useful as it has unit tests that fails on Mono.
Cheers





2007/7/20, Miguel de Icaza <miguel at novell.com>:
>
> hello Carlos,
>
>    Please post full samples.   Every time you post half the information
> you are forcing the developers to actually spend time reconstructing
> your test case.
>
> Miguel.
>
> >
> > public
> >
> > static void Main(string [] args)
> >
> > {
> >
> > Console.WriteLine("Hello World!");
> >
> > TestClass<int> test = new TestClass<int>();
> >
> > RuntimeMethodHandle methodHandle =
> > test.GetType().GetProperty("MyList").GetGetMethod().MethodHandle;
> >
> > MethodBase methodBase = MethodInfo.GetMethodFromHandle(methodHandle,
> > typeof(TestClass<int>).TypeHandle);
> >
> > List<int> list = (List< int>)methodBase.Invoke(test, null);
> >
> > Console.WriteLine(list.Count);
> >
> > }
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070721/683d1ce8/attachment.html 


More information about the Mono-list mailing list