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

Answer by v.slobodzian for What is the difference between String and string in C#?

$
0
0

Jeffrey Richter written:

Another way to think of this is that the C# compiler automatically assumes that you have the following using directives in all of your source code files:

using int = System.Int32;using uint = System.UInt32;using string = System.String;...

I’ve seen a number of developers confused, not knowing whether to use string or String in their code. Because in C# string (a keyword) maps exactly to System.String (an FCL type), there is no difference and either can be used.


Viewing all articles
Browse latest Browse all 69

Trending Articles



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