Geeks With Blogs
Kevin Rohling Building great s0ftware, 1 line at a time. June 2009 Entries
C# 4.0 Dynamics vs. Reflection
Yes, this is possibly the simplest app ever written and was cooked up as a lunch bet between myself (@sundriedcoder) and David Justice (@davidjustice) while waiting on our TFS server to be rebuilt. Goal, set a property one million times. Ah ha, here’s the catch! Do it once with Reflection, once using C# 4.0 dynamics and once using a plain old property setter (POPS – I just made this acronym up). The results just might amaze and frighten you. See below or just copy and paste into your VS 2010 console ......

Posted On Friday, June 26, 2009 3:48 PM

Copyright © SundriedCoder | Powered by: