[Solved] How to use if inside an if in C# [closed]


Following updated question, here is another try …

if ((entity.Price != 100000 && entity.Area != 2000 && entity.Number != 55)
 || (entity.Type != 3 || entity.Fraction <= 0.3))
{
  // Do stuff
}

Of course if you break those three statements out in to separate Boolean values that are appraised first then it is more readable.

solved How to use if inside an if in C# [closed]