110,534
社区成员
发帖
与我相关
我的任务
分享
String FilePath = Server.MapPath("~/xx.txt");
String x = "030503000304060203";
System.IO.FileStream fs = new System.IO.FileStream(FilePath, System.IO.FileMode.Create, System.IO.FileAccess.Write);
int NumberChars = x.Length;
for (int i = 0; i < NumberChars; i += 2)
fs.WriteByte(Convert.ToByte(x.Substring(i, 2), 16));
fs.Close();
}