dotnet / dotnet/dotnet-api-docs

Example code in INotifyPropertyChanged API throws NullReferenceException

Open
#6,603 2 comments 0 reactions 0 assignees View on GitHub
area-System.ComponentModel Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

Hello, Team!

I searched if this has been reported, but I have not found any issue about this. Anyway I found that the example code in the following site is not working properly:
https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.inotifypropertychanged?view=netframework-4.8

If I create the project, and build it, then click on the Button, I get the following exception:

"System.NullReferenceException: 'Object reference not set to an instance of an object.'
customerList was null."
![ExampleCodeNotWorking](https://user-images.githubusercontent.com/1839739/113476810-24419500-947e-11eb-980e-e399728aaddb.gif)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.