2023-12-11から1日間の記事一覧
C#でdefer IDisposableとusingで再現。 public class ScopedDefer : IDisposable { private readonly Action action; public ScopedDefer(Action action) { this.action = action; } public void Dispose() { action(); } } 使い方 stack++; using var _ = n…