Skip to content

Instantly share code, notes, and snippets.

@ITh4cker
Forked from mattifestation/build.bat
Created November 28, 2015 13:53
Show Gist options
  • Select an option

  • Save ITh4cker/20d06ef7de3cbecaebaa to your computer and use it in GitHub Desktop.

Select an option

Save ITh4cker/20d06ef7de3cbecaebaa to your computer and use it in GitHub Desktop.

Revisions

  1. @ICanHazDonuts ICanHazDonuts created this gist Jun 16, 2014.
    4 changes: 4 additions & 0 deletions build.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    csc test.cs
    ildasm /OUT=test.il test.exe
    type moduleinititalizer.il >> test.il
    ilasm /EXE /OUTPUT=test.exe test.il
    10 changes: 10 additions & 0 deletions moduleinititalizer.il
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    .method private hidebysig specialname rtspecialname static
    void .cctor() cil managed
    {
    .maxstack 8
    IL_0000: nop
    IL_0001: ldstr "Hello"
    IL_0006: call void [mscorlib]System.Console::Write(string)
    IL_000b: nop
    IL_000c: ret
    }
    12 changes: 12 additions & 0 deletions test.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    using System;

    namespace testns
    {
    class test
    {
    public static void Main(String[] args)
    {
    Console.WriteLine(", World!");
    }
    }
    }