c# - WPF OnNotifyPropertyChange Throws a null exception when instantiating an object -


i added field database , had update model database using ef. however, model shows correct fields , types. estimate class implement inotifypropertychanged well. working prior updating database, not sure went south

when traveling in debugger from:

currentestimate = new estimate(); 

to (as property changing):

private void notifypropertychanged([callermembername] string propertyname = "") {     propertychanged?.invoke(this, new propertychangedeventargs(propertyname)); } 

i null reference exception.

propertyname "currentestimate" , currentestimate not null once gets notifypropertychanged function.

implemnetation of currentestimate:

    private estimate _estimate;     public estimate currentestimate     {         { return _estimate; }         set { _estimate = value; notifypropertychanged(); }     } 

although exception being thrown at:

propertychanged?.invoke(this, new propertychangedeventargs(propertyname)); 

a custom converter culprit.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -