how to call class in if statement c# code example Example: if else c# if (condition) { // block of code to be executed if the condition is True }