Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Loading a File into a Byte ArrayDownload: Chilkat .NET Assemblies 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
If (lBytes > 0) Then
Dim fileData(lBytes-1) As Byte
' Read the file into a byte array
oFileStream.Read(fileData, 0, lBytes)
oFileStream.Close()
End If
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.