Reputation: 10431
Is there anyway to get a FieldInfo
from a field without using something like a string
with the name? Like:
class AClass
{
String AField;
}
GetFieldInfo(GetHandle(AField));
Upvotes: 1
Views: 134
Reputation: 887547
No; C# does not have an infoof
operator.
You can implement one using expression trees.
Upvotes: 2