Skip to content

Instantly share code, notes, and snippets.

View alexperovich's full-sized avatar

Alex Perovich alexperovich

View GitHub Profile
public struct SemaphoreLock : IDisposable
{
private readonly SemaphoreSlim sem;
private SemaphoreLock(SemaphoreSlim sem)
{
this.sem = sem;
}
public void Dispose()
using System;
namespace ConsoleApp1
{
interface IBar
{
void Foo();
}
class Program : IBar
{