Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Loading a File into a Byte Array How to load a file into a byte array in Visual Basic .NET ' Open a file that is to be loaded into a byte array
Dim oFile As System.IO.FileInfo
oFile = New System.IO.FileInfo("byte-data.dat")
Dim oFileStream As System.IO.FileStream = oFile.OpenRead()
Dim lBytes As Long = oFileStream.Length
Dim fileData(lBytes) As Byte
' Read the file into a byte array
oFileStream.Read(fileData, 0, lBytes)
oFileStream.Close()
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.