This file contains hidden or 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
| // preform (this & flags) != flags | |
| FCIMPL2(FC_BOOL_RET, ReflectionEnum::InternalHasFlag, Object *pRefThis, Object* pRefFlags) | |
| { | |
| FCALL_CONTRACT; | |
| VALIDATEOBJECT(pRefThis); | |
| BOOL cmp = false; | |
| _ASSERTE(pRefFlags != NULL); // Enum.cs would have thrown ArgumentNullException before calling into InternalHasFlag |
This file contains hidden or 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
| [System.Security.SecuritySafeCritical] | |
| public Boolean HasFlag(Enum flag) { | |
| if (flag == null) | |
| throw new ArgumentNullException("flag"); | |
| Contract.EndContractBlock(); | |
| if (!this.GetType().IsEquivalentTo(flag.GetType())) { | |
| throw new ArgumentException(Environment.GetResourceString("Argument_EnumTypeDoesNotMatch", flag.GetType(), this.GetType())); | |
| } |
NewerOlder