Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7828643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:25:29+00:00 2026-06-02T10:25:29+00:00

Since these IL codes what I see more, I like to learn how to

  • 0

Since these IL codes what I see more, I like to learn how to interpret them correctly.

I couldn’t find a documentation like C# Compiler or any other so I think I can pretty much take care of the rest after I learn this common ones:

Below are some sample IL codes containing what I need to know :

Sample 1:

.method private hidebysig static void  Main(string[] args) cil managed
{
  .entrypoint
  // Code size       15 (0xf)
  .maxstack  1
  .locals init ([0] class EnumReflection.DerivedClass derivedClass)
  IL_0000:  nop
  IL_0001:  newobj     instance void EnumReflection.DerivedClass::.ctor()
  IL_0006:  stloc.0
  IL_0007:  ldloc.0
  IL_0008:  callvirt   instance void EnumReflection.DerivedClass::WriteOutput()
  IL_000d:  nop
  IL_000e:  ret
} // end of method Program::Main

Sample 2:

.method public hidebysig specialname rtspecialname 
        instance void  .ctor() cil managed
{
  // Code size       38 (0x26)
  .maxstack  8
  IL_0000:  ldarg.0
  IL_0001:  ldstr      "Hello"
  IL_0006:  stfld      string EnumReflection.DerivedClass::hello
  IL_000b:  ldarg.0
  IL_000c:  ldstr      "World"
  IL_0011:  stfld      string EnumReflection.DerivedClass::world
  IL_0016:  ldarg.0
  IL_0017:  ldc.i4.s   123
  IL_0019:  stfld      int32 EnumReflection.DerivedClass::age
  IL_001e:  ldarg.0
  IL_001f:  call       instance void EnumReflection.BaseClass::.ctor()
  IL_0024:  nop
  IL_0025:  ret
} // end of method DerivedClass::.ctor

I know what these codes do since I produced them 🙂 however I’d like to learn more about corresponding IL code.

These samples contain IL codes like, and could you please explain command with question marks? and also what do those command stand for? So we can memorize them easily.

  • nop (for debugging – no operation)
  • newobj (it seems it is creating new object in heap)
  • stloc.0 ?
  • ldloc.0 ?
  • ret ?
  • ldarg.0 ?
  • ldstr ?
  • stfld ?
  • ldc.i4.s ?
  • .ctor – constructor

Understanding IL is important as it exposes how particular compiler produces codes and act in specific cases.

However, I couldn’t find a nice docs which contain examples as well about IL. CLR with C# 3.0 is a good book however eventually it isn’t a IL book so it doesn’t explain everything about IL.

EDIT:

I’ve found the specs and they tell these: Thanks to @usr.

  • nop (for debugging – no operation)
  • newobj – create a new object
  • stloc.0 – pop value from stack to local variable
  • ldloc.0 ? – load local variable onto the stack
  • ret – return from method
  • ldarg.0 – Load argument 0 onto the stack.
  • ldstr – load a literal string
  • stfld – store into a field of an object
  • ldc.i4.s – Push num onto the stack as int32 , short form.
  • .ctor – constructor
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T10:25:31+00:00Added an answer on June 2, 2026 at 10:25 am

    Microsoft standardized the CLR and published those standards. Partition III contains a wealth of information about IL/CIL and is suitable for learning. It is an excellent document.

    You can also learn IL by example. Compile a few simple methods in C# and look at the IL in reflector (it has an IL-mode).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since there are no C# source codes for Wait, Pulse, PulseAll methods. Does anyone
Since I don't quite know the language of these types of algorithms (i.e. how
To learn a bit more about FreeBSD and *nix systems in general, I'm starting
I'm rewording this question since I understand a bit more now. Originally, what I
Since app engine 1.4.2 was released, I am getting warnings like this in my
To make my code more readable, I like to avoid names of objects that
I work on this issue since yesterday. More specifically - I have some values
Hopefully this doesn't fall under general discussion topic, since I'd like it to be
So my app needs to let users generate random alphanumeric codes like A6BU31, 38QV3B,
I see a lot of c++ code that looks like this: for( const_iterator it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.