L
Lance
Hi,
How do you test for an object existing in C#? C# seems to differentiate
between 'null' and non-existance. In other languages I could test as so:
if(ex.InnerException.StackTrace != null)
nvc.Add("** INNER EXCEPTION", ex.InnerException.StackTrace.ToString());
But an exception gets thrown at the if(...) statement. 'Object Reference
not set to an Instance of an Object'.
So how can I test for an object's existance?
Thanks,
Lance
How do you test for an object existing in C#? C# seems to differentiate
between 'null' and non-existance. In other languages I could test as so:
if(ex.InnerException.StackTrace != null)
nvc.Add("** INNER EXCEPTION", ex.InnerException.StackTrace.ToString());
But an exception gets thrown at the if(...) statement. 'Object Reference
not set to an Instance of an Object'.
So how can I test for an object's existance?
Thanks,
Lance