首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

2进制打开文件解决办法

2012-02-14 
2进制打开文件Dim blob() As ByteOpen Fname For Binary As #1ReDim blob(LOF(1))Get #1, , blob()Close #

2进制打开文件
Dim blob() As Byte
Open Fname For Binary As #1
ReDim blob(LOF(1))
Get #1, , blob()
Close #1

这个是VB的2进制打开文件在.NET中该怎么转换?

[解决办法]
Private Function ReadFile(ByVal nFileName As String) As Byte()
Dim i As New IO.FileStream(nFileName, IO.FileMode.OpenOrCreate)
Dim n(i.Length - 1) As Byte
i.Read(n, 0, i.Length)
Return n
End Function
[解决办法]
look

http://topic.csdn.net/t/20020624/09/825261.html

热点排行