Skip to content

Instantly share code, notes, and snippets.

@ebenito
Created March 5, 2019 08:02
Show Gist options
  • Save ebenito/d975a50f149692e99d9299824bc83c89 to your computer and use it in GitHub Desktop.
Save ebenito/d975a50f149692e99d9299824bc83c89 to your computer and use it in GitHub Desktop.
Metodo de extensión IN:
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