Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 120467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:48:58+00:00 2026-05-11T03:48:58+00:00

Okay, this may be a dumb question, but I’ve not been able to find

  • 0

Okay, this may be a dumb question, but I’ve not been able to find any information on it.

Are String.Empty and string.Empty the same? I always find myself gravitating towards using the upper case version (String.Empty) because I prefer the color and look of it in my IDE than the lower case version (string.Empty)…

Is there a ‘correct’ way to use these that differ or is it entirely down to personal preference? It was my assumption that they’re both the same, but to be honest, I never gave it any thought until for whatever reason today I wondered ‘If they both exist, they must both exist for a reason’.

Is there a reason that anyone knows of? If so, what is it? Can anyone enlighten me?

P.S. The ‘exact duplicates’ only answer half of the question – ‘which is right?’, not the ‘why do they both exist?’


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

Exact Duplicate: String vs string in C#

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:48:58+00:00Added an answer on May 11, 2026 at 3:48 am

    In C#, lower-case type names are aliases for the System.xxx type names, e.g. string equals System.String and int equals System.Int32.

    It’s best practice to use these language aliases for the type names instead of their framework equivalent, for the sake of consistency. So you’re doing it wrong. 😉

    As for a reason why they both exist, the .NET types exist because they are defined in a language-independent standard for the .NET libraries called CTS (common type system). Why C# defines these aliases is beyond me (VB does something quite similar). I guess the two reasons are

    1. Habit. Get all these C and Java programmers to use C# by providing the same type names for some fundamental types.
    2. Laziness: You don’t have to import the System namespace to use them.

    EDIT Since many people seem to prefer the other notation let me point out that this is by no means unreasonable. A good case can actually be made for the usage of the CTS type names rather than C#’s keywords and some superficially good arguments are offered in the other answers. From a purity/style point of view I would probably concur.

    However, consider if this is worth breaking a well-established convention that helps to unify code across projects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay this may be a simple question but I have yet to come with
Okay this may sound silly, but I am not very familiar with XML. What
Okay, this may be a silly question but I'm still on my path to
Okay this may seem too simple of a question but I've wasted enough time
Okay, This may be really simple or it may not even be possible, or
Okay, so this one may be difficult but I will do my best to
Okay this is not a question of how to get all uniques or How
Okay this is probably a really dumb question, however it's really starting to hurt.
Okay this one may be a bit out from left field, but I'm going
Okay, this may seem silly, but on an ASP.NET .ascx control, I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.