读取.dat文件内容并将其转换的问题 StreamReader sr=File.open(@"c:\dd.dat");string s;while((s+=sr.readline())!=null){}sr.close(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 3楼好像这么做不行吧。我看网上有不少都是用BinaryReader读的,烦劳哪位用我这串数据做为样板写个例子。 参考 public static string ByteToString(byte[] InBytes) { string StringOut=""; foreach (byte InByte in InBytes) { StringOut=StringOut + String.Format("{0:X2} ",InByte); } return StringOut; } 做出来了,应该是这个意思。 private string HextoStr(byte b1,byte b2,byte b3,byte b4) { ulong long_amt=0; long_amt|=b1; long_amt|=(ulong)(b2<<8); long_amt|=(ulong)(b3<<16); long_amt|=(ulong)(b4<<24); return long_amt.ToString(); } 请问怎样让最小化的mdi窗口还原? c#读取ppt问题 combobox水平滚动条 自己写了一个控件怎样加到toolbox里去? 请教用domainUpDown做个时间上下调的,怎么做?给个代码 怎么样写这条SQL语句 做云空间服务器资源的分配,调度,实时监控系统 BS结构的 什么语言比较好? 请问在C#中如何根据一个字符串创建一个对象 请问,假如程序需要用户自行输入并执行SQL语句,如何达到这一目的? C# WinForm 只想实现打开一个窗口 DataGridView的问题 怎样过滤数组中重复的数据
我看网上有不少都是用BinaryReader读的,烦劳哪位用我这串数据做为样板写个例子。
public static string ByteToString(byte[] InBytes)
{
string StringOut="";
foreach (byte InByte in InBytes)
{
StringOut=StringOut + String.Format("{0:X2} ",InByte);
}
return StringOut;
}
{
ulong long_amt=0;
long_amt|=b1;
long_amt|=(ulong)(b2<<8);
long_amt|=(ulong)(b3<<16);
long_amt|=(ulong)(b4<<24);
return long_amt.ToString();
}