C
C#14mo ago
Asriela

✅ 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.
No description
7 Replies
Asriela
AsrielaOP14mo ago
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.
Bailey
Bailey14mo ago
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,
Asriela
AsrielaOP14mo ago
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
Pobiega
Pobiega14mo ago
$paste
MODiX
MODiX14mo ago
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!
SG97
SG9714mo ago
are you developing on a phone?
Asriela
AsrielaOP14mo ago
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
Want results from more Discord servers?
Add your server