Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
Visual Studio Intellisense shows "new expression can be simplified", but that fails the build

I have this code

MyClass instance = new MyClass();

VS Intellisense shows:

'new' expression can be simplified

and upon selecting that action, it changes the code to:

MyClass instance = new();

but then build fails with error code CS8181:

'new' cannot be used with tuple type. Use a tuple literal expression instead.

I am unable to understand this error message as MyClass is not related to tuple type. It's a plain class with int, string and list properties and no inheritance. Also, why should an Intellisense suggested action cause an error.

I've reported this issue to VS Dev Community. Link

Thanks in advance for your help.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As documented here this available if you use C#9.0+. I guess that you use lower version of C# than required.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!