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

326
Views
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 answers
Answer question

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 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!