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; }