if you had a status object with an Exception field, then you'd test for an exception as follows:
if (status.Exception != null) // oops, something bad
{
...
}
alternatively, you could have a "computed" property Success as follows
public class Status
{
...
public Exception Exception { get; set; }
...
public bool Success { get { return Exception == null; } }
...
}
then use it as follows:
if (status.Success) // cool, all good!
{
...
}
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein