System.String vs string

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

What is the difference between these two types. The both seem to have the
same methods. Is there an advantage to one over the other?
 
C# aliases types in the .NET Framework Base Class Library. C# string type
is really an alias for the System.String class in the .Net framework
library.
 
string maps to System.String. There is no disadvantage to use string in place
of String anywhere in your code. The only complaints you'll hear are completely
stylistic. Even the BCL team had an ongoing thought bubble about using C#
versus
BCL types in the source for the BCL itself.
 
Back
Top