null objects

All replies

  • what are null objects

    That is a simple question that can have a very complex answer.  See, for instance:

    If you provide some context (an example with an error message, perhaps) then it may be possible to make a more specific comment. For instance, the term 'null object' is often used when what is actually meant is 'no object'.

    • Proposed as answer by Cor Ligthert Saturday, April 22, 2017 8:41 AM
    Saturday, April 22, 2017 5:39 AM
  • Hi pavan,

    When you define a string variable, its contents are actually Null and not "". What's the difference? Null means that the variable has not been assigned a value (refer to Four rules for Nulls). "" means the Variable has been assigned a blank value.

    The System.DBNull value indicates that the Object represents missing or nonexistent data. DBNull is not the same as Nothing, which indicates that a variable has not yet been initialized. DBNull is also not the same as a zero-length string (""), which is sometimes referred to as a null string.

    Hope it is helpful to you.

    Best Regards,

    Cherry Bu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, April 25, 2017 2:54 AM