We can read / write data in memory like this :
static void Main(string[] args)
{
using (var ms = new MemoryStream())
{
var sw = new StreamWriter(ms);
sw.WriteLine("Hello World");
sw.Flush();
ms.Position = 0;
var sr = new StreamReader(ms);
var myStr = sr.ReadToEnd();
Console.WriteLine(myStr);
}
Console.WriteLine("Press any key to continue.");
Console.ReadKey();
}
Now i want to write data on Ram (Memory = Random Access Memory) and read those data from Another Application?
How can i do that and Share a string in memory?
Important Note : I don't want to write any data on hard disk.
Edit : My .net version is 3.5