C
C#2y 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
daveeska2y ago
here's where tileMap initialize:
Thinker
Thinker2y ago
Well, it's not null, it's just not initialized You need to initialize the array with a value
daveeska
daveeska2y ago
like that?
Thinker
Thinker2y ago
sure Although now it's empty, but that may be what you want
daveeska
daveeska2y ago
k