Last active
April 25, 2019 09:04
-
-
Save BitPuffin/b918854e8cbe2535aa5c380cb14d420d to your computer and use it in GitHub Desktop.
preprocessor memes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define interface void | |
using System; | |
namespace redefine | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello World!"); | |
Foo("hejsan"); | |
Greet("Kalle Anka"); | |
} | |
public static interface Foo(string msg) { | |
Console.WriteLine(msg); | |
} | |
#include "my_mixin.cs" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compile with | |
cc -x c -P -E Program.cs -o Program1.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static interface Greet(string name) { | |
Console.WriteLine("Hi there, " + name + "!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment