I started using Mono 5.2 with Jetbrains Rider and i got the following error in some peaces of my code:
So, looking at my Compiler settings i just have MSBUILD 14.0, i if i'm not wrong i need MSBUILD 15.0 to C# 7.0 works, right ?
How can i fix it ?
Edit 1 I setted the language to C# 7.0 but i can't use C# 7.0 features, see:
This don't work:
return (int?)idCompanhia;
I got the following error:
But this works fine:
return (int)idCompanhia;
Edit 2 This is my method using this int?
public static int? ObterIdCompanhia(string companhia)
{
int.TryParse(companhia, out var idCompanhia);
return idCompanhia == 0 ? null : (int?)idCompanhia;
}