static void Read(string filePath) { var shmem = new ProcessSharedMemory(filePath, "ShmemTest2"); MyData data = shmem.Read() as MyData; Console.WriteLine("{0}, {1}, {2}", data.myInt, data.myPt.x, data.myPt.y); }
static void Write(int p1, int p2, string p3, string filePath) { var shmem = new ProcessSharedMemory(filePath, "ShmemTest2"); MyData data = new MyData() { myInt = p1, myPt = new Point() { x = p2, y = p3 } }; shmem.Write(data); }