Avatar ·

Which versions of C# correspond to each version of .NET and Visual Studio?

Hi everyone! I'm a beginner C# developer, and I'm constantly confused by the versions. I know there are C# 7.0, C# 8.0, C# 9.0, and so on, but I don't understand how they relate to versions of .NET Framework, .NET Core, and Visual Studio. Here's an example: I open Visual Studio 2019, create a .NET Framework 4.7.2 project. Which version of C# can I use? And what if I create a .NET Core 3.1 project? Or .NET 5? And what happens if I try to write code in C# 9.0 (for example, using records) in a .NET Framework 4.8 project? ```csharp // I want to use record (C# 9.0) public record Person(string Name, int Age); // But my project is on .NET Framework 4.8 - will this compile? ``` It seems like Microsoft keeps changing the numbering, and I'm afraid I'm using the wrong language version in my project. Please tell me if there's