If you want to open in in an application (just like Windows would if you double-clicked a file with an appropriate extension), you will have to write its contents to a file:
/// <summary>
/// Saves the contents of the <paramref name="data"/> array into a
/// file named <paramref name="filename"/> placed in a temporary folder,
/// and runs the associated application for that file extension
/// in a separate process.
/// </summary>
/// <param name="data">The data array.</param>
/// <param name="filename">The filename.</param>
private static void OpenInAnotherApp(byte[] data, string filename)
{
var tempFolder = System.IO.Path.GetTempPath();
filename = System.IO.Path.Combine(tempFolder, filename);
System.IO.File.WriteAllBytes(filename, data);
System.Diagnostics.Process.Start(filename);
}
Usage:
var someText = "This is some text.";
var data = Encoding.ASCII.GetBytes(someText);
// open in Notepad
OpenInAnotherApp(data, "somename.txt");
Note that the file name is needed only for the extension, you should probably use a random Guid
or something and append the extension based on a known mimetype.