Switch causes "C# 4.0 specification" error

This is the exact line that error refers to:

    // Receives
    public void FUNCTIONNAME(string msg) {
        switch(msg) {

Error:
error CS1644: Feature `primary constructor’ cannot be used because it is not part of the C# 4.0 language specification

Compilers marks this error at 19 line, 17th characters, which to me is the new-line character, after string msg {.

What is a “primary constructor” ?
How do I fix it?

I looked it up on tutorial, and this is how they do it.

A primary constructor is a depreciated feature in C#.
Make sure your class declaration is not requesting parameters.