ReadAllBytes Method


ReadAllBytes Method

Location

My.Computer.FileSystem.ReadAllBytes

Syntax

     Dim result As Byte(  ) = My.Computer.FileSystem.ReadAllBytes(path) 


path (required; String)

The path of the file to read

Description

The ReadAllBytes method returns the entire contents of a text file as a Byte array.

Usage at a Glance

  • An exception is thrown if the path parameter is missing or invalid, or if the file it refers to does not exist.

  • An exception is thrown if the user lacks sufficient file access permissions.

  • An exception is thrown if the file content is too large for available memory.

Related Framework Entries

  • Microsoft.VisualBasic.FileIO.FileSystem.ReadAllBytes Method

  • Microsoft.VisualBasic.MyServices.FileSystemProxy.ReadAllBytes Method

See Also

FileSystem Object, OpenTextFieldParser Method, OpenTextFileReader Method, OpenTextFileWriter Method, ReadAllText Method, WriteAllBytes Method, WriteAllText Method




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net