In

public static bool In<T> (this T value, params T[] list )
        {
            return list.Contains(value);
        }
Example:
string value = "net";
            bool isIn = value.In("dot", "net", "languages"); //true
            isIn = value.In("dot", "note", "languages"); //false

Description

C# version of In clause of sql query.

Details

Double click on the code to select all.

 

;