private List _dates;
public List Dates
{
get { return _dates; }
set { _dates = value; }
}
OR
publi
I personally prefer the first method as it allows you to perform a few operations prior to the return.
E.G. (A really poor example)
private int _limit;
private int _onHand;
private bool returnToVendor;
public Item(int limit, int onHand)
{
_limit = limit;
_onHand = onHand;
}
public int ReturnStock
{
get
{
if(_onHand > _limit)
{
returnToVendor = true;
return _onHand;
}
}
set
{
_onHand = value;
if(_onHand < _limit)
{
returnToVendor = false;
}
}
}