String

  • Thread starter Thread starter Guest
  • Start date Start date
Arne Garvander said:
Howcome C# has string and String data types? Are they the same type?

Yes. "string" is just a shorthand for "System.String".
 
Jon Skeet said:
Yes. "string" is just a shorthand for "System.String".

To elaborate a little: The C# language has names for some commonly used
types. The .NET Framework has its own names for all of those, plus a lot
more. "string" is C# and "System.String" is .NET Framework. Both names are
usable in C# programs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top