C# looping through an array

后端 未结 7 2056
一生所求
一生所求 2021-01-07 20:16

I am looping through an array of strings, such as (1/12/1992 apple truck 12/10/10 orange bicycle). The array\'s length will always be divisible by 3. I need to loop through

7条回答
  •  悲&欢浪女
    2021-01-07 20:39

    string[] friends = new string[4];
    friends[0]= "ali";
    friends[1]= "Mike";
    friends[2]= "jan";
    friends[3]= "hamid";
    
    for (int i = 0; i < friends.Length; i++)
    {
        Console.WriteLine(friends[i]);
    }Console.ReadLine();
    

提交回复
热议问题