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

329
Vistas
What is the difference between String and string in C#?

Example ( Look at the case ):

 string s = "Hello world!"; String s = "Hello world!";

What are the guidelines for using each? And what are the differences?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

string is a C# alias for System.String .
So technically, there is no difference. It's like int vs. System.Int32

As for guidelines, it's generally recommended to use string whenever you refer to an object.

e.g

 string place = "world";

Similarly, I think using String is generally recommended if you need to refer specifically to the class.

e.g

 string greet = String.Format("Hello {0}!", place);

This is the style Microsoft often uses in its examples .

It appears that guidance in this area may have changed, as StyleCop now requires the use of C#-specific aliases.

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