Wednesday, September 16, 2009

Linq with relflection

Using Reflection at runtime is bit complex and accessing object by iterating through Collection will take time .Tried to use LINQ to object to simplify this process as much as possible




In Sample here I explained 2 Scenarios of using Reflection .



1.Dynamically getting the count of Property of specific Type in an object.

2.Dynamically loading an overloaded method

Illustration in the code has both classic methods and method using LINQ

http://www.codeproject.com/KB/linq/LINQ_with_Reflection.aspx

No comments:

Post a Comment