So an auto property is one which is declared like this:
int autoProp {get; private set;}
Where the associated member variable is automatically generated.
In the property list returned by GetType().GetProperties(), is there a way to distinguish between the two properties in the following class:
class MyClass
{
int regularPropertyValue;
int regularProperty { get { return regularPropertyValue;} set {regularPropertyValue = value;} }
int autoProperty {get; private set;}
};
Aucun commentaire:
Enregistrer un commentaire