CState C# version