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

Short answer: nothing. string is an alias to System.String. This also holds true for int and System.Int32.

If you want my personal preference I always use the lowercase version aka the alias. Why? Because I don't need to add the following reference: using System; in each file. I know, it's a little OCDish, but what can I say...

Published on Jan 24, 2020

Tags: ASP.NET MVC and Web API Tutorial | c# | string

Related Posts

Did you enjoy this article? If you did here are some more articles that I thought you will enjoy as they are very similar to the article that you just finished reading.

Tutorials

Learn how to code in HTML, CSS, JavaScript, Python, Ruby, PHP, Java, C#, SQL, and more.

No matter the programming language you're looking to learn, I've hopefully compiled an incredible set of tutorials for you to learn; whether you are beginner or an expert, there is something for everyone to learn. Each topic I go in-depth and provide many examples throughout. I can't wait for you to dig in and improve your skillset with any of the tutorials below.