110,539
社区成员
发帖
与我相关
我的任务
分享
byte[] newBuf = new byte[4];
Array.Copy(buf, 0, newBuf, 0, 4);
int y = System.BitConverter.ToInt32(newBuf, 0);
byte[] newBuf = { 50, 48, 49, 55 };
int num = int.Parse(Encoding.ASCII.GetString(newBuf));
byte[] newBuf = { 50, 48, 49, 55 };
var a = System.Text.ASCIIEncoding.ASCII.GetString(newBuf);
Response.Write(a);
byte[] newBuf = { 50, 48, 49, 55 };
int value = (int)((newBuf[0] & 0xFF) | ((newBuf[1] & 0xFF) << 8) | ((newBuf[2] & 0xFF) << 16) | ((newBuf[3] & 0xFF) << 24));
Console.WriteLine(value);