'I cannot use discards in c#

According to this link discards are supported since c# version 7.0 https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/discards

If I write an #error version it says 7.3

error version

This code in the same MVC app doesn't work:

        public ActionResult SomeEndpoint()
        {
            return SomeResult(out _);
        }

        private ActionResult SomeResult(out int theInt)
        {
            theInt = 42;
            return View();
        }

The error is: Error CS0103 The name '_' does not exist in the current context

What am I doing wrong?

Update: Is the target framework the problem? It's only 4.5.2. enter image description here

I'm using visual studio 2019



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source