Answers for "c # array.length why use -1"

C#
-2

how to get an arrays length in c#

int array[] array;
int index;
public void func(){
 for(int i; i < array.Length;i++){
  index++;
 }
  Console.Write(index);
}
Posted by: Guest on March-18-2021
0

c# array lenght

int arraylenght = YourArray.Length;
Posted by: Guest on January-08-2021
0

length of arr c#

string[] arr = {"foo", "bar"}
Console.WriteLine(arr.Length);
// >> 2
Posted by: Guest on January-18-2021

C# Answers by Framework

Browse Popular Code Answers by Language