Files
SharedMemoryExample/ReaderApp/Program.cs
T

14 lines
341 B
C#
Raw Normal View History

2026-11-19 09:50:21 +01:00
using SharedMemory;
2026-11-18 11:20:38 +01:00
try
{
using var numbers = new SharedArray<int>("MySharedArray");
Console.WriteLine(numbers.Length);
Console.WriteLine(numbers[0]);
Console.WriteLine(numbers[^1]);
}
catch (FileNotFoundException)
{
Console.WriteLine("No process has MySharedArray open. Start the first program before this one.");
}