DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.1.2" />

.NET API 436,696 bytes

 UserDataSlot

static class UserDataSlot
using DotNext.Threading; namespace DotNext { internal static class UserDataSlot { private static long counter; internal static long NewId => ref counter.IncrementAndGet(); } }