Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference Between String and string? [duplicate]

Possible Duplicate:
String vs string in C#

What is the difference Between String and string or Double and double?

if i use :

double s1; or

if i use Double s1;

can you give pros and cons?

like image 719
ALEXALEXIYEV Avatar asked Dec 02 '22 05:12

ALEXALEXIYEV


1 Answers

string is just the C# alias for the System.String class. The same is true for all the other built-in language types like:

  • int (System.Int32)
  • float (System.Single)
  • double (System.Double)
  • decimal (System.Decimal)
  • bool (System.Boolean)
  • and so on...

As far as usage conventions go, I completely agree with this answer on SO.

Related resources:

  • C# Built-in Types Table
like image 65
Enrico Campidoglio Avatar answered Dec 03 '22 18:12

Enrico Campidoglio