I have a property defined in an interface as:
Boolean IsBusy { get; }
It is implemented in the class as:
private Boolean _isBusy = false;
public Boolean IsBusy
{
get
{
return this._isBusy;
}
private set
{
if (this._isBusy != value)
{
this._isBusy = value;
this.OnPropertyChanged("IsBusy");
}
}
}
Then when I run the app, I always get following kind of error when check IsBusy value in constructor:
'IsBusy' threw an exception of type 'System.NullReferenceException' bool {System.NullReferenceException}
I can't figure it out. If I change all Boolean
to bool
, get same error.
How can I fix it?