Can we use 'contains' in if condition in same line ?

Can we use 'contains' in if condition in same line ?

Can we use 'contains' in if condition in same line ?

like 

if (Type contains  "ABC")
{ 
    // code
}

or any alternative for the same.