I constantly find myself writing similar code like the example below:
if (object["Object Name"] != null) {
if (object["Object Name"] == "Some Value") {
// Do Statement A
} else {
// Do Statement B
}
} else {
// Do Statement B
}
The problem here is that I much check if an object is null or not and then I can check it for it's actual contents.
"Statement B" is always the same and in my case is usually a SQL statement.
There must be a better way around this?
Thanks
Stephen