System.Reflection.MetadataToken.IsTokenOfType C# (CSharp) Method

IsTokenOfType() public static method

public static IsTokenOfType ( int token ) : bool
token int
return bool
        public static bool IsTokenOfType(int token, params MetadataTokenType[] types)
        {
            for (int i = 0; i < types.Length; i++)
            {
                if ((int)(token & 0xFF000000) == (int)types[i])
                    return true;
            }

            return false;
        }