private static long sharedState; public static long SharedState { get { return Interlocked.Read(ref sharedState); } set { Interlocked.Exchange(ref sharedState, value); } }