The int[,,] GetUpperBound method returns the maximum index values of a three-dimensional array in each of its dimensions. It is a built-in method in the C# language and does not require any external library to use.
Example:
int[,,] arr = new int[3, 4, 5];
int maxDim1 = arr.GetUpperBound(0); //returns 2, the maximum index value for dimension 0 int maxDim2 = arr.GetUpperBound(1); //returns 3, the maximum index value for dimension 1 int maxDim3 = arr.GetUpperBound(2); //returns 4, the maximum index value for dimension 2
In this example, we create a three-dimensional integer array of dimensions 3x4x5 using the new operator. We then use the GetUpperBound method to get the maximum index value for each of the three dimensions.
Package/Library: This method is not part of any external package or library, but is instead a built-in method of the C# language.
C# (CSharp) int[,,].GetUpperBound - 30 examples found. These are the top rated real world C# (CSharp) examples of int[,,].GetUpperBound extracted from open source projects. You can rate examples to help us improve the quality of examples.