C# if else condition with examples. In c# if else statement is having an optional else statement which will be executed in case if statement failed to execute.