C
C#3y ago
daveeska

How do I check the length of an array when that array is null?

How do I check the length of an array when that array is null? I've tried make it nullable by putting ? after int[] but it still doesn't work
5 Replies
daveeska
daveeskaOP3y ago
here's where tileMap initialize:
Thinker
Thinker3y ago
Well, it's not null, it's just not initialized You need to initialize the array with a value
daveeska
daveeskaOP3y ago
like that?
Thinker
Thinker3y ago
sure Although now it's empty, but that may be what you want
daveeska
daveeskaOP3y ago
k
Want results from more Discord servers?
Add your server