-
-
Save dearcodes/7f69a810bbe8a4e18b78 to your computer and use it in GitHub Desktop.
If con varias condiciones
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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