Posted by Pharaoh on October 11, 2010 ·
Ternary Operators ….
Basically ternary operators are just an inline if statements ..
Consider the following Pseudo code segment
bool isAdmin = getUserStatus();
string outPutMessage = "";
if (isAdmin)
{
outPutMessage = "You Are An Administrator";
}
else
{
outPutMessage = "You Are A Normal User";
}
MessageBox.Show(outPutMessage);
Assuming that getUserStatus() is a Method that returns a boolean [...]