DateTime? + INotifyPropertyChanged

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
h_kos
Posts: 11
Joined: Wed Oct 28, 2015 11:30 pm

DateTime? + INotifyPropertyChanged

Postby h_kos » Fri Nov 06, 2015 2:38 am

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

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: DateTime? + INotifyPropertyChanged

Postby JS-Support @Userware » Fri Nov 06, 2015 9:54 am

Thanks Harry for reporting this. We are going to look into it as soon as possible.

JS-Support


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 24 guests

 

 

cron