Click here to Skip to main content
Click here to Skip to main content
Alternatives (1)

Get Nested Property value using reflection and Linq.Expression

, 20 Nov 2011 CPOL
Get Nested Property value using reflection and Linq.Expression

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

8 Apr 2011
cechode
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...

License

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

Share

About the Author

Massimiliano Peluso "WeDev Limited"
Architect PeluSoft Limited
United Kingdom United Kingdom
I have been fascinated by software development since I was 10 years old. I'm proud of learned the first programming language with an Olivetti PC 128S based on Microsoft BASIC. I'm a Software Architect/Senior Developer with a strong background of all the developing Microsoft's technologies.

| | Privacy | Terms of Use | Mobile
Web03 | 2.8.150123.1 | Last Updated 20 Nov 2011
Article Copyright 2011 by Massimiliano Peluso "WeDev Limited"
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid