null in C#

Discussion in 'C#' started by sashimi, Nov 23, 2007.

  1. sashimi

    sashimi New Member

    Joined:
    Nov 22, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I wonder what is 'null' in C#. why it is not equal with any '0' ((i means 0x00, '\0', etc.)) even it's value is '0' ? :confused:
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,351
    Likes Received:
    382
    Trophy Points:
    83
    null is null but every object has its own null like System.Empty and Color.Empty.
     
  3. narayan

    narayan New Member

    Joined:
    Apr 9, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Null is referred to as nothing and it can be assigned to varchar or string variable and also to int

    where as 0 is the value assigned to int
     

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