/* * C# Program to Find the Rank of a given Array */using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpDemoApps
{
classProgram
{
static voidMain(string[] args)
{
int[] array1 = newint[5] { 1, 2, 3, 4, 5 };
int[,] array2 = newint[10, 3];
Console.WriteLine("Total dimensions of Array is : " + array1.Rank);
Console.WriteLine("Total dimensions of Array is : " + array2.Rank);
Console.ReadLine();
}
}
}
Total dimensions of Array is : 1
Total dimensions of Array is : 2