Skip to content

Instantly share code, notes, and snippets.

@dearcodes
Last active August 29, 2015 14:06
Show Gist options
  • Save dearcodes/7f69a810bbe8a4e18b78 to your computer and use it in GitHub Desktop.
Save dearcodes/7f69a810bbe8a4e18b78 to your computer and use it in GitHub Desktop.
If con varias condiciones
if (new[] {1, 2}.Contains(value))
//OR
public static bool In<T>(this T obj, params T[] args)
{
return args.Contains(obj);
}
if (1.In(1, 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment