Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# check if 2d array position exists

// make sure we're not referencing cells out of bounds of the array
if (tileX < arr.GetLength(0) && tileY < arr.GetLength(1))
{
    // logic
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #array #position #exists
ADD COMMENT
Topic
Name
6+9 =