Created
May 15, 2019 06:39
-
-
Save arphox/96c91d9daa8c7b2298f272d2c68f1517 to your computer and use it in GitHub Desktop.
Generic attempt for IsSet
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 bool IsSet2<T>(this T self, T flag) where T : Enum | |
{ | |
return (self & flag) == flag; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shared on Medium, don't delete!