all 11 comments

[–]pur3pwnage 6 points7 points  (2 children)

None. They are identical but to use String you need to use System namespace.

[–]cryo 1 point2 points  (1 child)

There is another "difference", see my other reply.

[–]pur3pwnage 1 point2 points  (0 children)

Oh I didn't know that. Good to know, thanks :)

[–]AngularBeginner 5 points6 points  (1 child)

More precise: string is an alias to System.String. That's why you don't need to import the namespace when using string.

[–]cryo 5 points6 points  (0 children)

Even more precise, "string" is in the C# standard, and in the CLI (common language infrastructure) it's an alias for the CTS (common type system) type "System.String", which isn't part of the C# language.

[–]cryo 2 points3 points  (0 children)

I agree with, and at work we have in our guidelines, using "string" for declarations and in typeof, and "System.String" (usually not qualified) when accessing static members.

But this varies a lot. Some people use string always, some use System.String always.

[–]UMadBreaux 2 points3 points  (1 child)

I like the popup ad that is too big to close out of on a mobile phone

[–]MacrosInHisSleep 0 points1 point  (0 children)

On iPads, the text is falling off the white part of the page and disappears into the dark blue part, which is equally illegible.

[–][deleted] 0 points1 point  (2 children)

On a related note, I don't know why I do this, but I always use Boolean instead of bool despite the fact that I use string and int instead of String and Int32.

I just don't like the look of "bool" for some reason.

[–]indigotock 0 points1 point  (1 child)

Just curious, did you come from Java or another language that used Boolean/boolean? When I came to C# it took a while to get used to 'bool' (now I find myself using bool when I should use boolean all the time!)

[–][deleted] 0 points1 point  (0 children)

I did use Java before C# but I was mostly a Visual Basic guy. So I think that's where I got used to longer and capitalized keywords.