I am trying to give the value of filestream:
stream
To an array of bytes:
buffer
Can someone give me the correct syntax for assigning a filestream to a 1-dimensional array of byte?
I am receiving the following errors:
Value of type 'long' cannot be converted to a '1-dimensional array of byte'
'Create a stream to load the file
Dim stream As FileStream = New FileStream("\\DirectoryName1\DirectoryName2\DirectoryName3\fileName.pdf", FileMode.Open, FileAccess.Read)
'Create a buffer to hold the information
'Dim buffer() As Byte = CType(stream.Length, Byte())
Please help!
Thanks Pink
stream
To an array of bytes:
buffer
Can someone give me the correct syntax for assigning a filestream to a 1-dimensional array of byte?
I am receiving the following errors:
Value of type 'long' cannot be converted to a '1-dimensional array of byte'
'Create a stream to load the file
Dim stream As FileStream = New FileStream("\\DirectoryName1\DirectoryName2\DirectoryName3\fileName.pdf", FileMode.Open, FileAccess.Read)
'Create a buffer to hold the information
'Dim buffer() As Byte = CType(stream.Length, Byte())
Please help!
Thanks Pink