/ Published in: C#
I love creating simple little extension methods like this to make my code read more better.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static bool In<T>(this T value, params T[] values) { return values.Contains(value); } public static bool NotIn<T>(this T value, params T[] values) { return !In(value, values); }