-
-
Save ebenito/d975a50f149692e99d9299824bc83c89 to your computer and use it in GitHub Desktop.
Metodo de extensión IN:
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
public static class Ext | |
{ | |
public static bool In<T>(this T t, params T[] values) | |
{ | |
foreach (T value in values) | |
{ | |
if (t.Equals(value)) | |
{ | |
return true; | |
} | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment