[ConditionalAttribute("DEBUG")]定义Check()方法为conditional method,如果预处理符号(preprocessor symbol)没有定义,compiler不仅忽略该方法,而且忽略对该方法的调用,和#if DEBUG / #else / #endif有些类似。
基于6个网页-相关网页
Its only purpose is to check at runtime whether or not the supplied preprocessor symbol is defined.
它唯一的目的是在运行时检查给定的预定义符号是否被定义。
A symbol that was not defined was used with a preprocessor directive.
未定义的符号与预处理器指令一起使用。
That is, a variable name should not be passed to a preprocessor directive and a symbol can only be evaluated by a preprocessor directive.
即,不应将变量名传递到预处理器指令,并且只能用预处理器指令计算符号。
应用推荐