Check out example codes for "how to do else in c#". It will help you in understanding the concepts better.

Code Example 1

if (condition)
{
  // block of code to be executed if the condition is True
} 
else 
{
  // block of code to be executed if the condition is False
}

Learn ReactJs, React Native from akashmittal.com