IsNothing Function


IsNothing Function

Class

Microsoft.VisualBasic.Information

Syntax

     Dim result As Boolean = IsNothing  (expression) 


expression (required; any)

The expression to compare with Nothing

Description

The IsNothing function determines whether expression evaluates to Nothing (true) or not (False). The line:

     If IsNothing(someObject) Then 

is equivalent to:

     If (someObject Is Nothing) Then 

Version Differences

  • The IsNothing function is new with VB under .NET.

  • Visual Basic 2005 includes a new IsNullOrEmpty method as part of the String data type that may better meet your needs.

See Also

Is Operator, IsNot Operator, Nothing Keyword




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net