Search code examples
c#macroscode-contracts

Is there any way to emulate "macros" in c#?


I’m trying to make CodeContracts in C# look more like statements so i need a tool that allows me substitute some code before the compiler sees it, if there is no way to do it i guess a Visual Studio plug in would help too.


Solution

  • Trying to fight the syntax of a language like C# is simply a bad idea. The tools you use will fight back with determination.

    Just go with the flow and stop trying to swim against the current. You'll soon get used to the syntax and it will make sense to everyone else who works with the code.