is operator and nothing keyword are used together to check whether an object variable does not refer to any object. The nothing value can be assigned to all types of variables and it is default value of a variable when it is declared. However, when nothing is used with the is keyword, only reference and nullable types are accepted.
In VB, the nullable variable can have a value or can have no value (not available) at all and it is declared with ? sign
(e.g. Dim x? As integer).
Dim x As Object
If x Is Nothing Then
Posted by: shalo | post date: 02-06-2013 | Subject: VB.NET Programming Language
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: