From msdn :
FileSystem.ReadByteByte transferred to Int32 or -1 if end of stream is reached.
So -1 is basically a "magical meaning." Does this mean that bytes returned from streams are never negative? If not, why not?
In C #, a byte values ββare a number from 0 to 255, so the byte is never negative.
byte
The sbyte data sbyte is a signed byte, so it has a value from -128 to 127.
sbyte
(In some other languages, such as Java, the byte data type is signed.)
Since bytes are not negative, they are numbers in the value 0-255.
byte cannot be negative, can it? It is equal to 0 ... 255.
FileStream.ReadByte () returns the byte value to the Int32 value, it returns -1 only if the end of the stream is reached.
Source: https://habr.com/ru/post/890578/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/890573/converting-ip-address-to-host-name-via-dnsgethostentry&usg=ALkJrhiM9wrV6csCpACXMrEOQc8EOTOYNQHow to get padding between table cells, but not across the table? - htmlSubset Issue - Greplin Call - algorithmHow to overwrite SQLite DB in iOS when a new version of the application is released - iosRecommended way to embed JVM in program C with NO library? - creloading the scoreboard and touch gestures - objective-cC ++ dll returned string is damaged in C # calling why? - c ++How to observe a change in properties NSObject - propertiesHow can I enclose an extension in perl? - perlFile Not Found In Delphi 7 - delphiAll Articles