Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is difference between String and string in C#

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 141
    Comment on it

    C# defines number of alias names for CLR (i.e. Common Language Runtime) types. Technically, there is no difference between string and String, as string is just the alias name for System.String or String.
    System.String is a static sealed class, whether you invoke it by string or String, it makes no difference. Same thing is for int and System.Int32. int is alias name for System.Int32.
    Here is the list of aliases defined by C#

    AliasCLR type
    stringSystem.String
    sbyteSystem.SByte
    byteSystem.Byte
    shortSystem.Int16
    ushortSystem.UInt16
    intSystem.Int32
    uintSystem.UInt32
    longSystem.Int64
    ulongSystem.Int64
    charSystem.Char
    floatSystem.Single
    doubleSystem.Double
    bool System.Boolean
    decimalSystem.Decimal

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: