Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

See also, XVBT

 

Hi,

I use:

 

Dim MyArray() As String = = EmailMessage.GetHeaderField("Disposition-Notification-To")

 

EmailMessage is a 3rd party component, now it may or may not have anything, so the array is null/nothing in that case.

In that case, any operation on array will return System.NullReferenceException

Even if I want to check if the array :

 

If MyArray IsNot Nothing

or

If MyArray.Length = 0

 

All will result in System.NullReferenceException

How to check such an array at all?

Thanks.

Edited by snarfblam
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...