Page 1 of 1

DateTime? + INotifyPropertyChanged

Posted: Fri Nov 06, 2015 2:38 am
by h_kos
Setting a nullable DateTime causes exception:

Code: Select all

    public class Assessment : INotifyPropertyChanged
    {
       
        private DateTime? _assessmentTimeStarted;
        public DateTime? AssessmentTimeStarted
        {
            get { return _assessmentTimeStarted; }
            set
            {             
                if (_assessmentTimeStarted == value)   <---- Exception!!!
                    return;
                _assessmentTimeStarted = value;
                OnPropertyChanged("AssessmentTimeStarted");
            }
        }
        ....
     }




Setting a value causes an exception: Nullable has no value

Re: DateTime? + INotifyPropertyChanged

Posted: Fri Nov 06, 2015 9:54 am
by JS-Support @Userware
Thanks Harry for reporting this. We are going to look into it as soon as possible.

JS-Support