菜鸟(求助)编译说是int并不包含对format的定义
using System;class Text
{
unsafe static void WriteLocations(byte[] arr)
{fixed(byte *p_arr=arr)
{byte *p_elem=p_arr;
for(int i=0;i<arr.Length;i++)
{byte value=*p_elem;
string addr=int.Format((int) p_elem,"X");
Console.WriteLine("arr[{0}] at 0x{1} is {2}",i,addr,value);
p_elem++;
}
}
}
static void Main()
{byte[] arr=new byte [] {1,2,3,4,5};
WriteLocations(arr);
}
}
编译说是int并不包含对format的定义