I have two simple lines of Python Script where the len(fileData) is 3530
Python
imgFile = file(inputFile, "rb")
fileData = imgFile.read()
and I'm trying to convert it to vb.net. If I do this, I can get the length to match up but I'm stuck trying to actually get the data itself to a string variable:
VB.NET
Using reader As New BinaryReader(File.Open(inputFile, FileMode.Open))
Dim length As Integer = reader.BaseStream.Length
End Using
I tried using
VB.NET
Dim fileData As String = File.ReadAllText(inputFile)
But when I do len(fileData), it 3528, so something is amiss.
I just want to open and read the binary file to a string variable and see the length of it is 3530 as it is currently, correctly working in the Python script.
What am I missing?