Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

238
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda