C#读取文件为byte[]
转载请注明出处 http://www.cnblogs.com/Huerye/
/// <summary> /// 读取程序生成byte /// </summary> private byte[] createTxt() { FileStream stream = new FileInfo(txtAdd.Text).OpenRead(); byte[] buffer = new byte[stream.Length+1]; stream.Read(buffer, 0, Convert.ToInt32(stream.Length)); return buffer ; }