© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•14mo ago•
2 replies
fraantic

How can I check if an index of a 2d array is out of bounds?

tittle
if (array[value1][value2] == outOfBounds) {
  // do smth
}
if (array[value1][value2] == outOfBounds) {
  // do smth
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

❔ Index Out of Bounds Exception
C#CC# / help
3y ago
index outside the bounds of array error
C#CC# / help
3y ago
✅ Index was outside of bounds of the array
C#CC# / help
3y ago
✅ How can I print a 2D array
C#CC# / help
4y ago