❔ Error "System.NullReferenceException: "Object reference not set to an instance of an object.
Hi all, error "System.NullReferenceException: "Object reference not set to an instance of an object.". Please help me to understand what's wrong
Code: https://gist.github.com/1lchenko/85f8dff3673e667bfbad6ed9ebd93ce1
6 Replies
Something is null
$debug and it will be obvious what
Tutorial: Debug C# code - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
But I don't understand how to fix
Assign something to it
if you want it non-null to start with initialize it with
new()
private BindingList<TodoModel1> todoDataList = new();
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.