dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlBlob Class / IsNull Property
Example

In This Topic
IsNull Property (MySqlBlob)
In This Topic
Gets a value indicating whether the MySqlBlob is a Null stream.
Syntax
'Declaration
 
Public ReadOnly Property IsNull As Boolean
 

Property Value

true, if the MySqlBlob is a Null; otherwise, false.
Example
In this sample a Null value is assigned to a MySqlBlob instance, then some properties are checked. If unchanged, this code produces the following output:

It is empty.

It is Null.

public void MySqlBlobNullTest()
{
  MySqlBlob myBlob = new MySqlBlob();
  myBlob = MySqlBlob.Null;
  if (myBlob.CanRead)
  {
    Console.WriteLine("It can read.");
  }
  if (myBlob.CanWrite)
  {
    Console.WriteLine("It can write.");
  }
  if (myBlob.CanSeek)
  {
    Console.WriteLine("It can seek.");
  }
  if (myBlob.IsEmpty)
  {
    Console.WriteLine("It is empty.");
  }
  if (myBlob.IsNull)
  {
    Console.WriteLine("It is Null.");
  }
}
Public Sub MySqlBlobNullTest()
  Dim myBlob As MySqlBlob = New MySqlBlob
  myBlob = MySqlBlob.Null
  If myBlob.CanRead Then
    Console.WriteLine("It can read.")
  End If
  If myBlob.CanWrite Then
    Console.WriteLine("It can write.")
  End If
  If (myBlob.CanSeek) Then
    Console.WriteLine("It can seek.")
  End If
  If myBlob.IsEmpty Then
    Console.WriteLine("It is empty.")
  End If
  If myBlob.IsNull Then
    Console.WriteLine("It is Null.")
  End If
End Sub
See Also