C#: Multiple if else in OOP style

If there are multiple selections, you can also use if with a series of else statements.

If Else
using System;

namespace Conditional
{
    class Program
    {
        private int number;

        private Program(int number1)
        {
            number = number1;
        }

        private void checkNumber()
        {
            if (number == 5)
            {
                Console.WriteLine("The number is 5");
            }
            else if (number == 10)
            {
                Console.WriteLine("The number is 10");
            }
            else
            {
                Console.WriteLine("The number is not found");
            }
        }

        static void Main()
        {
            int x = 10;

            Program check = new Program(x);
            check.checkNumber();
            Console.ReadLine();
        }
    }
}

In this case, the else statements are immediately followed by an if without using braces.