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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:25:01+00:00 2026-05-14T07:25:01+00:00

I have a dll which I disassemble in Reflector, I then generate a class.

  • 0

I have a dll which I disassemble in Reflector, I then generate a class.
The class contains code which does not compile in Visual Studio.

I take it it’s leagl IL code, but how can I generate the higher level c# from this.

Seems yield and IEnumerator generate things like <>1__state; in the IL which will not compile.

Does anybody know how I can generate a class from reflector that contains this sort of IL?

Is there a reflector addin that will solves this?

    private sealed class <Rule_Document>d__0 : IEnumerable<HtmlTag>, IEnumerable, IEnumerator<HtmlTag>, IEnumerator, IDisposable
    {
        private int <>1__state;
        private HtmlTag <>2__current;
        public HtmlParser <>4__this;
        private int <>l__initialThreadId;
        public HtmlTag <htmlTag>5__1;
  • 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-14T07:25:02+00:00Added an answer on May 14, 2026 at 7:25 am

    That IL is from an iterator block. Iterators are horrible to write manually, and the underlying IL from an iterator block is testament to the reality of what the compiler does for you. Be grateful you didn’t have to do it yourself!

    You could try putting that together mainly from the MoveNext(), but don’t expect miracles. You may also find that renaming the fields (to get rid of things like <> prefixes) goes a long way.

    However; I expect the best thing to do is to understand what the code is trying to do, and stop trying to simply steal borrow their implementation.

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

Sidebar

Related Questions

I have a DLL which contains a class with static members . I use
I have a DLL which is written in native C++. The Visual Studio project
I have a dll called Test.dll in which I have a class called ABC
I have a DLL which contains unmanaged classes with methods. I'm trying to call
I have a dll which accepts a struct that contains a pointer to a
I have a DLL (Test.dll) which contains some Excel Addin, i don't know which
I have a DLL which exports a few functions. The source file contains a
I have a dll which contains this function: int __stdcall PrnText(char *printtext); In Windows
I have a dll which exports the interface class Qwe{ virtual void a() =
I have a Dll which is added into another solution now my code for

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.