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 6100037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:20:27+00:00 2026-05-23T13:20:27+00:00

When you see a line in the IL like: // Code size 25 (0x19)

  • 0

When you see a line in the IL like:

// Code size       25 (0x19)

what does nit actually mean? Is it talking about the (bytes of) memory usage? All I was able to gather was that it is one more than the number of IL lines. Below is the full IL.

.method private hidebysig static void  Execute(string y) cil managed
{
  // Code size       25 (0x19)
  .maxstack  8
  IL_0000:  nop
  IL_0001:  ldstr      "string"
  IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
  IL_000b:  nop
  IL_000c:  ldarg.0
  IL_000d:  callvirt   instance class [mscorlib]System.Type [mscorlib]System.Object::GetType()
  IL_0012:  call       void [mscorlib]System.Console::WriteLine(object)
  IL_0017:  nop
  IL_0018:  ret
} //

When I look at ECMA_335 documentation, it defines code size as: Size of the code (text) section, or the sum of all code sections if there are multiple sections. (huh?)

  • 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-05-23T13:20:27+00:00Added an answer on May 23, 2026 at 1:20 pm

    Not all IL opcodes are the same size, and the encoding of the arguments to different opcodes also take up different amounts of space. The “code size” is the size of all opcodes plus the sizes of their operands.

    For instance, the nop opcode is a single byte (as seen by OpCodes.Nop.Size), and doesn’t take any operand (as seen by OpCodes.Nop.OperandType), so the first line requires a single byte (which is why the second line is labeled with IL_0001).

    Likewise, ldstr is also a single byte, but the string argument is represented in IL by a string table offset, which takes 4 bytes (importantly, the contents of the string don’t factor into this calculation), so your second IL instruction takes 5 bytes total (and the third line gets labeled with IL_0006).

    And so on.

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

Sidebar

Related Questions

Here's my code. See the line that is commented out. When the element id
See what you think of this line of code: if ([pickerViewController.picker.bvc.currentResolve.name isEqualToString:message]) ... Would
this line of the code makes the form see-through User32Wrappers.SetLayeredWindowAttributes(Me.Handle, 0, _ 255 *
I can see line numbers in my error logs in our development environment, in
So I'm looking here and I see the command line switches. http://mono-project.com/Command_Line_MoMA This is
Is it possible to see the history of changes to a particular line of
break line tag is not working in firefox, neither in chrome. When i see
Is it possible to see the return value of a method after the line
I'm using the command line compiler for builds. One problem I see is that
I have a piece of code where I see a warning saying I am

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.