Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

amir734jj/PropertyInfoViaLinq

Repository files navigation

Deprecated in favor of InfoViaLinq


Property Info via Linq

This simple project grabs property name using Linq. Inspired by this awesome StackOverFlow post.

Nuget Link

Get property info via Linq's Expression

IGetPropertyInfoViaLinq<Person> _utility = new GetPropertyInfoViaLinq<Person>();

// returns: "Parents.GreatParents.Parents.FatherName"
_utility.GetPropertyName(x => x.Parents.GreatParents.Parents.FatherName);

// returns custom attributes via linq
_utility.GetAttribute(x => x.Parents.GreatParents.Parents.FatherName, typeof(DisplayAttribute));

Notes:

  • Please see the unit test project for more info on how to use the package.

About

Get property info via Linq's Expression

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages