What is the way to obtain a thread safe counter in C# with best possible performance?
This is as simple as it gets:
public static long GetNextValue()
Try with Interlocked.Increment