0

I started using Mono 5.2 with Jetbrains Rider and i got the following error in some peaces of my code:

enter image description here

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:

enter image description here

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;
        }
Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92

0 Answers0