Quite often in my code I need to compare a variable to several values :
if ( type == BillType.Bill || type == BillType.Payment || type == BillType.Receipt )
{
  // Do stuff
}
I keep on thinking I can do :
if ( type in ( BillType.Bill, BillType.Payment, BillType.Receipt ) )
{
   // Do stuff
}
But of course thats SQL that allows this.
Is there a tidier way in C#?
 
     
     
     
     
     
     
     
    