Click here to Skip to main content
15,891,375 members
Articles / Programming Languages / C#

Getting Property Name using LINQ

Rate me:
Please Sign up or sign in to vote.
3.75/5 (6 votes)
7 Feb 2010CPOL 22.5K   5  
Sometimes we want to compare the property names like,if (e.PropertyName == "FirstName"){//Do Something}But this is not type safe. If we change the property name then this won’t work as expected and also it won’t throw compile time error. For getting property name for Type safe...

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
Software Developer Tata Consultancy Services
India India
I have been working in different .NET Technologies like ASP.NET,WPF,Silverlight for the last few years.I am enjoying my life as a Programmer and spending time with my Family,Friends & Camera.

My Technical Blog


My Photo Blog


Comments and Discussions