Reading bytes in a file in vb.net

After getting the file name, I create a new stream and load all the bytes from the FileStream into an array of bytes, now I need to get the specific bytes and save them in fields, such as 4 bytes - the time the file was created. When they are stored in variables, I have to store them as bytes or as a string / integers, etc.

Or did I do it completely wrong?

EDIT: Should I do this and not stream?

Dim data() as Byte = File.ReadAllBytes(path1)
+3
source share
2 answers

File.ReadAllBytes - , . , . StreamReader , File.ReadAllBytes.

- , API . File type - , , ( " ", StreamReader).

, - ( ).

+2

, Read (), , , , , - . / DateTime ..

+1

Source: https://habr.com/ru/post/1727090/


All Articles