Selecting alternate items of an array C#

后端 未结 9 2031
遇见更好的自我
遇见更好的自我 2020-12-22 00:28

I have an array statsname as

apple
X
banana
Y
Kiwi
z

I need to put apple,banana and Kiwi in an array Fruits and X,Y and Z in an array calle

9条回答
  •  醉梦人生
    2020-12-22 01:08

    string[] rawarray = new string [] {"Apple","X" .....};
    string[] Fruites = new string[rawarray.Length/2+1];
    string[] Alphabets = new string[rawarray.Length/2];
    
    For(int i=0; i

提交回复
热议问题