110,538
社区成员
发帖
与我相关
我的任务
分享
FileStream FS = new FileStream("abc.hex", FileMode.Open);
FS.Postion = 10;//这个C++中的Seek()一样。
public string HexNumberToString(string InputString)
{
int len = InputString.Length >> 1;
byte[] str = new byte[len];
for (int i = 0; i < len; i++)
{
string temp = InputString.Substring(i << 1, 2);
if (temp.Length > 0)
{
str[i] = byte.Parse(temp, System.Globalization.NumberStyles.HexNumber);
}
}
return Encoding.Default.GetString(str);
}