Skip to content

Instantly share code, notes, and snippets.

@arphox
Created May 15, 2019 06:39
Show Gist options
  • Save arphox/96c91d9daa8c7b2298f272d2c68f1517 to your computer and use it in GitHub Desktop.
Save arphox/96c91d9daa8c7b2298f272d2c68f1517 to your computer and use it in GitHub Desktop.
Generic attempt for IsSet
public static bool IsSet2<T>(this T self, T flag) where T : Enum
{
return (self & flag) == flag;
}
@arphox
Copy link
Author

arphox commented May 15, 2019

Shared on Medium, don't delete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment