How to get array length in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        int[] arr = { 6, 8, 2, 1, 0 };
         
        Console.WriteLine(arr.Length);
    }
}




/*
run:

5

*/

 



answered Nov 25, 2020 by avibootz

Related questions

...