пятница, 19 февраля 2010 г.

Надо обязательно посмотреть лучшие видео 2009 года вот отсюда:
http://www.vimeo.com/album/159627/

How to convert Stream to byte array

It's pretty easy!

Code on C#:
  1. int length = Convert.ToInt32(inputStream.Length); // get strem length
  2. byte[] byteArr = new byte[length]; // create a byte array
  3. inputStream.Read(byteArr, 0, length);
  4. inputStream.Close();
* This source code was highlighted with Source Code Highlighter.

Code on VB you can find here: http://snipplr.com/view/2012/stream-to-byte-array/