✅ cant resolve object reference not set error
GitHub
testing/Program.cs at main · Asriela/testing
Contribute to Asriela/testing development by creating an account on GitHub.
7 Replies
I deleted allot of code so that i dont go over the character limmit so know the other methods are all there as well as the main method.
My question is simply how do i resolve that error? Thank you very much.
Hi,
step 1 find the line where the error occurs. The error says that you try to access an object which does not exits.
e.g.
List<person> persons = new list<person>
if you now try get the property like
person[10] which does not yet exist, then you get an error like this. but there are many more possibilities. So use the editor and when getting an error. chech the values and then chech why is it not filled or shouldn't you acces this,
Is there a way i can get past the character limmit and show the full code?
In addition i cant say where the line the error occures because it doesnt say in the error message, thats the full error message u have there
$paste
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
are you developing on a phone?
I added a github link and yes im using a mobile app to do my studies
This seems like a challenging fix because even on sololearn the app im using to study c# people seem to not be able to find the issue yet.
Thank you for the help so far.
===
It was the objects array that wasnt filled with objects
/close