Quantcast
Channel: What is the difference between String and string in C#? - Stack Overflow
Browsing all 69 articles
Browse latest View live
↧

Answer by Anthony Mastrean for What is the difference between String and...

I prefer the capitalized .NET types (rather than the aliases) for formatting reasons. The .NET types are colored the same as other object types (the value types are proper objects, after...

View Article


Answer by user3296 for What is the difference between String and string in C#?

There is one difference - you can't use String without using System; beforehand.Updated:"String" with a capital "S" is a keyword that refers to the built-in string data type in the .NET Framework's...

View Article


Answer by Mel for What is the difference between String and string in C#?

It's a matter of convention, really. string just looks more like C/C++ style. The general convention is to use whatever shortcuts your chosen language has provided (int/Int for Int32). This goes for...

View Article

Answer by Luke Foust for What is the difference between String and string in C#?

The best answer I have ever heard about using the provided type aliases in C# comes from Jeffrey Richter in his book CLR Via C#. Here are his 3 reasons:I've seen a number of developers confused, not...

View Article

Answer by urini for What is the difference between String and string in C#?

Lower case string is an alias for System.String.They are the same in C#.There's a debate over whether you should use the System types (System.Int32, System.String, etc.) types or the C# aliases (int,...

View Article


Answer by Ronnie for What is the difference between String and string in C#?

System.String is the .NET string class - in C# string is an alias for System.String - so in use they are the same.As for guidelines I wouldn't get too bogged down and just use whichever you feel like -...

View Article

Answer by Derek Park for What is the difference between String and string in C#?

string is an alias in C# for System.String.So technically, there is no difference. It's like intvs.System.Int32.As far as guidelines, it's generally recommended to use string any time you're referring...

View Article

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

What are the differences between these two, and which one should I use?string s = "Hello world!";String s = "Hello world!";

View Article


Answer by Nima Habibollahi for What is the difference between String and...

Technically there is no difference, but there are these minor differences:Language vs framework: string is alias built in data-type and alias keywords but String is alias part of class library:...

View Article

Browsing all 69 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>