How can I rewrite he following code using C#3.0 automatic properties?
private int _myValue;
public int MyProperty
{
get { return _myValue;}
set
{
if (value > 0)
{
_myValue = value;
}
}
}
If it is not possible, What is the alternative?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…