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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:23:57+00:00 2026-05-25T19:23:57+00:00

During the process of obfuscating a .NET assembly (using Dotfuscator), I have found myself

  • 0

During the process of obfuscating a .NET assembly (using Dotfuscator), I have found myself tweaking how things are renamed. This often involves looking at the assembly in ILDASM and tracing a Type back to the source code file that it is defined in.

Usually this is a simple process. But I have found that locating an Anonymous Type is very difficult — especially in a large assembly.

If I am trying to find the location of an anonymous type, such as the following line of code:

new { Name = 'Gene', Age = 30 }

Which is compiled as:

<>f__AnonymousType0`2'<'<Name>j__TPar','<Age>j__TPar'>`

And appears as the root of the assembly in the ILDASM tree.

If I want to locate the anonymous type in the source code, I am left without much help:

  • No Namespace
  • No symbols to search on
  • Nothing in the Solution Navigator
  • Nothing in the Class View
  • Nothing in the Object Browser

Am I missing something? Are there any tools to help locate an Anonymous Type in code files?

  • 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-25T19:23:57+00:00Added an answer on May 25, 2026 at 7:23 pm

    Obviously the code for the anonymous class itself isn’t present in the original source code, but there’s source code which leads to the creation of the anonymous class, and I assume that’s what you’re trying to find. However, There may be multiple source files involved.

    For example, in your example, there could be:

    Class1.cs:
        var x = new { Name = "Jon", Age = 10 };
    
    Class2.cs:
        var y = new { Name = 100, Age = 10m };
    
    // And potentially many other source files
    

    Both of those would use the same generic type, but with different type arguments. Basically you’d need to find every anonymous-object-creation-expression expression using the same property names in the same order. I wouldn’t be surprised if the metadata contained nothing to help you here directly.

    EDIT: The generated code will contain a reference to the constructor of the anonymous type, of course – so you could look for that. It’s not clear what tools you’re using, but searching for the name of the anonymous type within the IL would fine the uses.

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

Sidebar

Related Questions

I'm porting C++ code from Linux to Windows. During this process, I found out
I have a large project which I am compiling with GWT. During this process
We have a custom build process (not using MS Build) and during that process
I've posted a couple other questions during this process, but I have a better
During the process of building software applications, you would start testing what you have
I'm using WF 3.5 and during the process of spinning up a couple of
I am firing an Ajax request using jQuery. During the process, I show a
I would like to accomplish two things during my build process: Run unit tests
I'm using the module simplenews and during the registration process it reads Select the
I hope this is programming-related enough. What exactly happens during the shutdown process of

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.