Good evening everyone. I had the following problem - I try to use the contracts that appear in C # to check the code, but for some reason they don’t work. I have the following code:
public static string Type<T>(T some) { /* было бы очень здорово, если бы следующая строка выполнялась, чего она, однако, не делает */ Contract.Requires(some != null); return some.GetType().ToString(); }
I work in Visual Studio 2012 Ultimate. The resharper kindly highlights the code in gray, indicating that the compiler will not need to be invoked because of the method. I probably missed something, but what?