0

I am looking into web examples of Byte Array. Now from below statement i understand that I am creating a Byte Array which can stone 1024 values by why 1024 is always used in any of byte array example i found on internet?

byte[] byteBuffer = new byte[1024];

Value "1024" can be anything depending upon my requirements, Right?

Jef
  • 25
  • 6
  • It is a nice round number when you count with two fingers like computers do, 1024 == Math.Pow(2, 10). Programmers say "one kilobyte". 256 and 4096 are other common values. If this is a buffer to read data from a file or a network socket then you [typically prefer 4096](http://stackoverflow.com/a/3034155/17034). – Hans Passant Aug 22 '16 at 08:21
  • Thank you, I was looking for it. – Jef Aug 22 '16 at 11:43

0 Answers0