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

  • Home
  • SEARCH
  • 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 6544103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:25:33+00:00 2026-05-25T11:25:33+00:00

After running ILDASM on two assemblies generated from identical C# code (but potentially different

  • 0

After running ILDASM on two assemblies generated from identical C# code (but potentially different compiler versions), I get the following output, from each respective dll.

.locals init (class MyClass/'<>c__DisplayClass3' V_0)

and

.locals init ([0] class MyClass/'<>c__DisplayClass3' 'CS$<>8__locals4')

What is the difference between these two statements, specifically, what is the significance of the '[0]' symbol?

  • 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-25T11:25:34+00:00Added an answer on May 25, 2026 at 11:25 am

    The two statements are functionally identical. The difference is caused by ILDASM using data from a .pdb in the second case. When debugging information is available, ILDASM includes the variable name and index; otherwise it gives them generic names and omits the index.

    I can only speculate that the index is included to help you associate any ldloc.x instructions with their variable names.

    As an aside, explicitly supplying the variable index could be useful when editing MSIL by hand, since it may prevent you from making a mistake when adding or removing locals:

    .locals init ([0] int32 x,
                  [1] int32 y,
                  [2] int32 z)
    ldloc.1 //load y
    

    If you later removed x without reviewing your method and fixing up your indexes:

    .locals init ([1] int32 y, //error -- Undefined type of local var slot 0 in method frob
                  [2] int32 z)
    ldloc.1 //oops, would have loaded z
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After running Code Analysis in VS2010 beta (FxCop for previous versions) I'm getting the
I get the following output after running the code for a picture [1459]./image_info.pl lah.png
After running the code below I get this output: Eve 1200 Could anyone explain
How do you automatically start a service after running an install from a Visual
Is there an easy way to get a conflict summary after running a cvs
Similar to this question , after running the following code the browser dialog does
After running syncdb and creating a su, where does that get recorded? Settings.py doesn't
ORIGINAL MESSAGE (now outdated): After running python setup.py install I get the following: Warning:
After running WPF animations on dependency properties in code behind, the dependency properties can
I noticed after running, DELETE FROM tablename My ID (auto increment) values became weird

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.