using System.Collections.Generic; using System.Linq; namespace VCommon.Collections { public static class ShortcutExtensionMethod { public static bool In(this byte source, params byte[] toChecks) => toChecks.Contains(source); public static bool In(this byte source, IEnumerable toChecks) => toChecks.Contains(source); public static bool In(this T source, params T[] toChecks) => toChecks.Contains(source); public static bool In(this T source, IEnumerable toChecks) => toChecks.Contains(source); public static bool NotIn(this T source, params T[] toChecks) => false == toChecks.Contains(source); public static bool NotIn(this T source, IEnumerable toChecks) => false == toChecks.Contains(source); } }