用unsafe代码实现,如下
class Program{ unsafe static void Main(string[] args) { byte[,]arr2 ={{1,2,3}, {2,4,3},{6,7,8}}; fixed (byte* p = &arr2[0, 0]) { for (int i = 0; i < 9; i++) { Console.WriteLine(*(p + i)); } } }}