Hello guys, please don't be too harsh. I am a beginner.
What is the best practice for and what is the difference b/n the following:
#1
public SodaDateTime DteRegistered
{
get { return DateTimeUtil.NullDateForMaxOrMinDate(this._dteRegistered); }
set
{
if (DateTimeUtil.IsNullDate(value))
{
this._dteRegistered = new SodaDateTime("DteRegistered", this, DateTime.Today);
}
else
{
this._dteRegistered = new SodaDateTime("DteRegistered", this, value);
}
}
}
VS.
#2
public SodaDateTime DteRegistered
{
get
{
if (DateTimeUtil.IsNullDate(this._dteRegistered))
{
_dteRegistered = new SodaDateTime("DteRegistered", this, DateTime.Today);
}
return this._dteRegistered;
}
set { _dteRegistered = new SodaDateTime("DteRegistered", this, value); }
}