Files
SharedMemoryExample/ReaderApp/Program.cs
T
Matthias Heil a42b3393d4 Add typed shared-memory buffer example
Introduce a generic shared buffer with typed span access and
timeout-based read/write waits. Update the sample to verify data
shared between two buffer views.
2026-11-19 09:50:21 +01:00

14 lines
341 B
C#

using SharedMemory;
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.");
}