Cant understand how simple do it
public class MyClass
{
public string FName;
public double DoSumma;
}
I wish simple Method like this
public string GetName(...)
{
return ...
}
...
string propertyname = GetName(MyClass.DoSumma);
// propertyname = "MyClass.DoSumma"
...
I know about
$"{nameof(MyClass)}.{nameof(MyClass.DoSumma)}"
Help?
Aucun commentaire:
Enregistrer un commentaire