மாற்று! » பதிவர்கள்

alrusina

How can I get objects and property values from expression trees?    
March 11, 2010, 9:44 pm | தலைப்புப் பக்கம்

This is a follow-up to the Getting Information About Objects, Types, and Members with Expression Trees post, so I would recommend that you read that one first. Among other code examples in that blog post, I demonstrated how you can get a property name as a string by using expression trees. Here is the method. public static string GetName<T>(Expression<Func<T>> e) { var member = (MemberExpression)e.Body; return member.Member.Name; } And here is how you can...தொடர்ந்து படிக்கவும் »
பகுப்புகள்: