C# Macro definitions in Preprocessor

前端 未结 10 1726
走了就别回头了
走了就别回头了 2020-11-29 04:16

Is C# able to define macros as is done in the C programming language with pre-processor statements? I would like to simplify regular typing of certain repeating statements

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 04:55

    No, C# does not support preprocessor macros like C. Visual Studio on the other hand has snippets. Visual Studio's snippets are a feature of the IDE and are expanded in the editor rather than replaced in the code on compilation by a preprocessor.

提交回复
热议问题