Adding adaptation to C# version compatibility