This programming puzzle is inspired by another question which has been asked here yesterday but which was deleted by the author...
The challenge:
Create an executable binary (Windows .EXE or Linux binary) using Visual C# (or your favorite C# IDE) which prints the following text to the standard output:
Main() is the main method of C# programs! ... without using the 4 consecutive letters M-A-I-N appearing in any source file!
Notes:
- If your source code contains the text
remainder(for example) it contains the 4 consecutive letters M-A-I-N, however if it containsmxainthe 4 letters would not be consecutive any more somxainwould be allowed. You are not allowed to run any programs but the C# IDE nor change the settings of the C# IDE to run other programs (but the ones it would normally run such as the C# compiler).
Otherwise you could simply say: "I write a Pascal program using the C# IDE and invoke the Pascal compiler in the 'pre-build' steps of my C# project".
This would be too simple.
Users of an IDE that can be extending using "plug-ins" (or similar) or that have built-in binary file editors (hex-editors) would have a too large advantage over users of other C# IDEs.
Therefore these featrues should also not be used.
- Using the other non-ASCII-Editors (such as the dialog window editor) is explicitly allowed!
- The user asking the original question proposed using the backslash in function names just like this:
static void M\u0061in()Because this answer has already been read by other users it will not be accepted any more! - A user asked if it would be allowed to simply type in an .EXE file into the source code editor and to save the file as ".exe" instead of ".cs". Answer: I doub't that this is possible because both valid Windows and Linux binaries contain NUL bytes. However if you find a valid binary that can be created this way you have a valid solution.
The name of this site is "Programming Puzzles & Code Golf" - this is a "Programming Puzzle", not "Code Golf": The challenge is to find a working solution before all other users, not to find a solution shorter than all other solutions.
Therefore the first post describing a working solution wins!
Good luck!
By the way: I have a solution working under Visual C# Express 2010.








