How can i Check a static method result using If else statement?

for eg:
IsPostponed is a static method and it returns a bool value.
because of a static method we can call the method without an object.
then how can i check it?

You can think of a static method as a class method; methods must be contained within a class in C#. The following should work:

if (MyClass.IsPostponed())
{
..
}

Where MyClass contains the definition of the static method.

Hey dude, it id static method means you can use class name to call method so simple to use in if... else

Syntax
if(Class_name.Method_name==true)
{
//your code
}
else
{
//your code
}

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.