- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Get the width and height of a three-dimensional array
Let’s say our three-dimensional array is −
int[,,] arr = new int[3,4,5];
To get the height and width i.e. the rows and columns.
Array.GetLength(0) – for rows Array.GetLength(1) – for columns
Example
using System; class Program { static void Main() { int[,,] arr = new int[3,4,5]; Console.WriteLine(arr.GetLength(0)); Console.WriteLine(arr.GetLength(1)); Console.WriteLine(arr.GetLength(2)); } }
Output
3 4 5
- Related Articles
- Get bounds of a C# three-dimensional array
- Creating a two-dimensional array with given width and height in JavaScript
- Get Upperbound and Lowerbound of a three-dimensional array in C#
- Get rank of a three-dimensional array in C#
- How to form a two-dimensional array with given width (columns) and height (rows) in JavaScript ?
- How to get the height and width of the android.widget.ImageView?
- How do I get the width and height of a Tkinter window?
- Get the Inner product of a One-Dimensional and a Two-Dimensional array in Python
- Size of a Three-dimensional array in C#
- How to get the Width and Height of the screen in JavaScript?
- How to get the width and height of an android.widget.ImageView in Kotlin?
- Get the inverse of a Four-Dimensional array in Python
- How do I get the height and width of the Android Navigation Bar programmatically?
- How to find the mean of three-dimensional array in R?
- Return a new Three-Dimensional array without initializing entries and change the order in Numpy

Advertisements