Follow @RoyOsherove on Twitter

Strongly Typed Reflection Calls in .NET 2.0

Oren Eini is trying to cheat Reflection, that is, create his own, "strongly typed" version of reflection, and what he's done so far seems like a very cool and nice workaround:
 
" I don't like strings and Reflection. In fact, you could say that I hate them with a passion. I hate them because they hide important information from the compiler. This post is actually not a rant, it presents a solution to the problem.

I hate them so much that I wrote my own Mocking Framework that don't use strings at all. .Net has some really great stuff that you can do with Reflection, but it has two big problems.

  • It is a performance hit.
  • It uses strings. "
Read how he solves this in his blog post.

Amazoner 1.0.1 - Larger Images for Books and a dedicated website

Representing void methods with generic delegates