4

The Null-conditional Operators has supposedly been introduced in C# 6.0 (or .NET Framework 4.6). However, my project uses the 4.5.2 version of the framework (C# 5.0). While I'm using Visual Studio 2015, the IDE seems to understand the new notation and compiles/works properly. However, I'm confused about whether the project would still work upon publish. My development machine has 4.6 installed but the production server might not.

In other words, is the Null-conditional Operators really compatible with 4.5.2 or am I missing something?

yazanpro
  • 4,512
  • 6
  • 44
  • 66

1 Answers1

10

C# 6 works on the NET 4.5.1. You don't need .Net 4.6.

For more see Does C# 6.0 work for .NET 4.0?

Community
  • 1
  • 1
Suren Srapyan
  • 66,568
  • 14
  • 114
  • 112