Ever wonder how to save a byte[] array and run it? This is the code I use to launch a PDF files I have as byte[] arrays. // identify temporary file path, save // let's hope Adobe reader is installed!
var _Folder = System.IO.Path.GetTempPath();
var _File = string.Format("{0}.PDF", Guid.NewGuid());
var _Path = System.IO.Path.Combine(_Folder, _File);
System.IO.File.WriteAllBytes(_Path, bytes);
System.Diagnostics.Process.Start(_Path);
Home »
» Save Bytes and Run
Save Bytes and Run
|
0 comments:
Post a Comment