byte[] MyData = new byte[0]; //*this is my byte array. i wll get my bytes from my database,name,ect*// MemoryStream stream = new MemoryStream(MyData); //now i have mydata in stream
FileStream fs2= null; FileStream fs = new FileStream(@"C:\sd.txt",FileMode.Open); byte[] data = new byte[fs.Length]; fs.Read(data,0,(int)fs.Length); fs2.Read(data,0,(int)fs.Length); fs.Close(); System.Diagnostics.Process.Start(fs2.Name);
string fileName = "D:\\image.png"; byte[] buffer = File.ReadAllByte(fileName); Stram stream = new MemoryStream(buffer); this.PictureBox.Image = Image.FromStream(stream);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)