how to get length of arrray you dont know c# code example Example: length of arr c# string[] arr = {"foo", "bar"} Console.WriteLine(arr.Length); // >> 2