Click here to Skip to main content
15,896,063 members
Articles / Web Development / ASP.NET

Get Nested Property value using reflection and Linq.Expression

Rate me:
Please Sign up or sign in to vote.
4.67/5 (3 votes)
8 Apr 2011CPOL 21.5K   2  
Saw this a while back; it's simpler (dirty and wrong but... ):public static T Get(Func getDelegate, bool DefaultTOnNull = false, T defaultVal = null) where T : class{ T result = null; try { result = getDelegate(); } catch...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions