C# if else shortcut

c#

Solution

It sounds like you're trying to write

if ((condition1 && count > 6) || !condition2)
    SomeMethod();

Problem

In C# how can I express the following if else statement using a shorter method(with ?): ``` if (condition1 == true && count > 6) { dothismethod(value); } else if (condition2 == false) { dothismethod(value); } ``` My code looks really messy with these statements. Can someone direct me to a good resource on if then else short cut syntax?

Original source