• 2022-06-06
    下列使用foreach语句遍历整个数组正确的是( )
    A: foreach(int i in arr){Console.WriteLine(i);}
    B: foreach(int i in arr){Console.WriteLine(arr[i]);}
    C: .foreach(int arr[i] in arr){Console.WriteLine(arr[i]);}
    D: foreach(int arr[i] in arr){Console.WriteLine(i);}