✅ Absolutely clueless about this nullreference exception
So I have this piece of code in my WPF+WCF application. For some reason I get an exception as "i" just doesnt exist ("sess[] was null"), no matter if it is a local variable inside brackets or placed like this. "users" is a list of arrays (chess game where 2 players are in one array).
13 Replies
sess
is the one that's nullwell its not
it is
there is no other possible explanation
you see it just ignores i for some reason
I did rebuild the project
i'm not sure what you mean by "ignore"
can you show the full error
yeah just gotta change the lang to english
ohhh i forgot how arrays work
that the pointer is set to the 0 pos
and if i empty it then the array will be null
an empty array and null array are not the same thing if that's what you're trying to say
nonono
i have a struct as the first element in the array
and set this struct to null somewhere in the code
so here i have the null as the array while the size is still 2
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.