would the same work for a switch statement?
switch (null)
{
case dt:
{} break;
case dt.rows:
{} break;
default:
{/*actual exec., we have asserted everything's cool*/}
}
or how about this?
switch (true)
{
case (dt == null):
{/*handle the case that dt is null,
i.e. assign it something*/} break;
case (dt.rows == null):
{/*handle the case that dt.rows is null*/} break;
case (dt.rows[0]["number"] == 0):
{/*this element equals 0, it now needs to be assigned*/} break;
default:
{/*computer finally does something right*/} break;
}
maybe nest either one in a do loop till the computer gets its sh*t straight. please tell me why this is wrong, as i am just learning.