Miscellaneous Newbie questions

Discussion in 'C#' started by codeunlock, Apr 29, 2007.

  1. codeunlock

    codeunlock New Member

    Joined:
    Apr 18, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    No sense in putting each one in a different post.

    1. What is the difference between String and string (upper- and lower-
    case)?
    2. Which is preferable, IntVariable.ToString() or
    Convert.ToString(IntVariable)?
    3. Since String is a class, why is there no String.ToClass, but there
    is a StrVariable.ToString?
    4. If int is a primitive, why am I allowed to say int i = new int()?

    Others to come ...
     
  2. matuatua

    matuatua New Member

    Joined:
    Aug 31, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    String is a group of letters enclosed with two invented commas whilst string is a variable declared in c++.mind u c++ is case sensitive.
    2.convert.ToString(intvariable)
    3.this is bcos strvariable is a key word in c++.
    4.this is bcos the new int() is a function u declared and then assigned to the variable i
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice