[Mono-dev] gmcs and The Future

Marek Safar marek.safar at seznam.cz
Wed Feb 4 05:59:47 EST 2009

>> static readonly MethodInfo methodInfo = typeof(Foo).GetMethod("Bar", new Type [] { typeof(string), typeof(int) });
> Not only is this an eyesore, but we have a method name in a string. If
> I refactor that method, I will have to remember to update this code as
> well.
> Solution: The "reflect" keyword. This is like the typeof keyword, but
> you can use it to reflect upon anything.
No need for that, C# 4.0 will support dynamic binding which means you 
will able to write

Foo.Bar ("a", 1);

directly in your C# code.


More information about the Mono-devel-list mailing list