Initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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.");
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SharedMemory" Version="2.3.4" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user