[Mono-list] GetMethodFromHandle and NotImplementedException

Miguel de Icaza miguel at novell.com
Fri Jul 20 15:35:40 EDT 2007


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); 
> 
> }
> 
> 


More information about the Mono-list mailing list