Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » C#   (RSS)

Using C# Dynamic to simplify ADO.NET Data Access

Update (11/7/09) : fixed Execute() method per Richard’s suggestion to wrap IDataRecord instead of Reader. Recently, I started playing around with C# dynamic, and blogged how it could be used to call static class members late bound . Today, I was talking
Posted by davidebb | 16 Comments
Filed under: ,

Attachment(s): DataReaderWithDynamic.zip

Using C# dynamic to call static members

By now, you’ve probably heard that C# 4.0 is adding support for the dynamic keyword, which introduces some aspects of dynamic languages to C#.  I had not had a chance to really try it, but recently I was reading Bertrand Le Roy’s post on the topic,
Posted by davidebb | 13 Comments
Filed under: , ,

Attachment(s): DynamicCallsToStaticMembers.zip

C# method overload resolution can play tricks on you

While working on T4MVC , I ran into a very tricky C# compiler behavior that I thought I’d share.  T4MVC creates various overloads that allow you to avoid literal strings.  One such case is that you can replace: routes.MapRoute( "UpcomingDinners",
Posted by davidebb | 5 Comments
Filed under: ,
 
Page view tracker