I have a large 3d array of data that I will be reading and writing to randomly. By design, approximately 5% of these operations will fall outside the bounds of this array and will be handled differently. Is this an appropriate place to use a try/catch block? Otherwise, I need 6 individual 'if' statements to check the addresses against the array bounds.
Perhaps I am trying to micro-optimize here, but these operations may be happening tens of thousands of times per second. In addition, it would make for slightly cleaner code. I'm using C# here, but I imagine this is a language-independent question.