ought to be:
vb中 Open "C:\1.exe" For Binary As #1
filelen = LOF(1)
strContent = Space$(filelen)
Get #1, , strContent
vb中 Open "C:\1.exe" For Binary As #1
filelen = LOF(1)
strContent = Space$(filelen)
Get #1, , strContent
换成
System.Text.Encoding.GetEncoding("gb2312").GetString(MyData);
参见我的问题:
http://expert.csdn.net/Expert/topic/2539/2539409.xml?temp=.1281549
我帖一下第一行
vb的:
MZ ÿÿ @ ? ???L?This program cannot be run in DOS mode.
C#的
MZ  @ ? ???L?This program cannot be run in DOS mode.
vb的:
MZ ÿÿ @ ? ???L?This program cannot be run in DOS mode.
C#的
MZ  @ ? ???L?This program cannot be run in DOS mode.
其中This program cannot be run in DOS mode.就是字符串阿,其他的不是的,况且这种读法不叫做2进制,是16进制的
那个是我把它写到文件,再用ue打开,粘出来的。关键是vb和c#里的结果不一样。是否C#中修改某些参数,就可以得到相同的结果呢?