Sgt-Peppa
Jun 2nd, 2004, 07:32 AM
Hey all, this seems to be easy but I cant seem to figure out how to check if a string array has already been initialized?
If I have public string [] attachments; defined in my class.
No I want to check if the array has got any values in it, but if I do,
if (attachments.Length !=0)
I get an error saying:
Object reference not set to an instance of an object.
So how do I check if my array has already been initialized or not?
Thanks Stephan
If I have public string [] attachments; defined in my class.
No I want to check if the array has got any values in it, but if I do,
if (attachments.Length !=0)
I get an error saying:
Object reference not set to an instance of an object.
So how do I check if my array has already been initialized or not?
Thanks Stephan