![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
How to find the Rank of a given Array in C#?
To find the rank of an array, use the Rank property.
Firstly, declare and initialize an array.
int[,] myArr = new int[3,3];
Now, get the rank.
myArr.Rank
Let us see the complete code −
Example
using System; class Demo { static void Main() { int[,] myArr = new int[3,3]; Console.WriteLine("Rank of Array : " + myArr.Rank); } }
Output
Rank of Array : 2
Advertisements