jeudi 17 septembre 2020

C# extract lambda expression dynamic as string [duplicate]

I have this function:

private string getPropertyAsString<T>(Expression<Func<T, dynamic>> property)
{
}

I want to extract the property from the lambda as string

For example getPropertyAsString<someClass>(x=>x.Test);
Will return "Test"





Aucun commentaire:

Enregistrer un commentaire