Skip to content
Discussion options

You must be logged in to vote

I'm pretty sure if you want you can write CIL if you create a project that uses Microsoft.NET.Sdk.IL

.class private auto ansi beforefieldinit Program
    extends [System.Runtime]System.Object
{
    .method private hidebysig static 
        void '<Main>$' (
            string[] args
        ) cil managed 
    {
        .maxstack 8
        .entrypoint

        ldstr "Hello World"
        call void [System.Console]System.Console::WriteLine(string)
        nop
        ret
    }
}

That is about as close as you can get to no syntax sugar while still writing text based code in .NET.

Replies: 9 comments 15 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@huoyaoyuan
Comment options

@jnm2
Comment options

jnm2 Jul 5, 2025
Collaborator

@huoyaoyuan
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@HaloFour
Comment options

@bbarry
Comment options

Answer selected by CyrusNajmabadi
Comment options

You must be logged in to vote
4 replies
@CyrusNajmabadi
Comment options

@CyrusNajmabadi
Comment options

@CyrusNajmabadi
Comment options

@CyrusNajmabadi
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@gchling
Comment options

@CyrusNajmabadi
Comment options

@HaloFour
Comment options

@gchling
Comment options

@CyrusNajmabadi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants