One thought on “I have noticed that in C# there are two different types of string (string and String). What is the difference between them and what are the guidelines for their use?

  1. Technically there is no difference, string is an alias for System.String in .net programming. When referring to Objects it is recommended to use string. String is generally recommended when you need to refer specifically to the class.
    Examples:

    string strPlace = “earth”
    string strStatement = String.Format(“The {0} is a beautiful planet.”,strPlace)

Comments are closed.