Check out example codes for "c#if". It will help you in understanding the concepts better.

Code Example 1

if(number > 10)
        Console.WriteLine("test1");
        else
        if(number < 0)
            Console.WriteLine("test2");

Learn ReactJs, React Native from akashmittal.com