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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:28:39+00:00 2026-05-12T22:28:39+00:00

I am attempting to recover source from an assembly using Reg Gate’s Reflector. The

  • 0

I am attempting to recover source from an assembly using Reg Gate’s Reflector. The original source took advantage of several C# 3.0 features which has made it a little difficult to recover. For instance here is the recovered source for an anonymous type. The first thing that pops out is the <> in from on the class identifier. Run time type naming rules are apparently more liberal than design time rules. Fair enough. A simple search and replace will fix that. What other compiler manglings must I look out for and how do I deal with them?

[DebuggerDisplay(@"\{ OverrideType = {OverrideType}, EntityType = {EntityType} }", Type="<Anonymous Type>"), CompilerGenerated]
internal sealed class <>f__AnonymousType1<<OverrideType>j__TPar, <EntityType>j__TPar>
{
    [DebuggerBrowsable(DebuggerBrowsableState.Never)]
    private readonly <EntityType>j__TPar <EntityType>i__Field;
    [DebuggerBrowsable(DebuggerBrowsableState.Never)]
    private readonly <OverrideType>j__TPar <OverrideType>i__Field;

    [DebuggerHidden]
    public <>f__AnonymousType1(<OverrideType>j__TPar OverrideType, <EntityType>j__TPar EntityType)
    {
        this.<OverrideType>i__Field = OverrideType;
        this.<EntityType>i__Field = EntityType;
    }

    [DebuggerHidden]
    public override bool Equals(object value)
    {
        var type = value as <>f__AnonymousType1<<OverrideType>j__TPar, <EntityType>j__TPar>;
        return (((type != null) && EqualityComparer<> <<OverrideType>j__TPar>.Default.Equals(this.<OverrideType>i__Field, type.<OverrideType>i__Field)) && EqualityComparer<<EntityType>j__TPar>.Default.Equals(this.<EntityType>i__Field, type.<EntityType>i__Field));
    }

    [DebuggerHidden]
    public override int GetHashCode()
    {
        int num = -338316509;
        num = (-1521134295 * num) + EqualityComparer<<OverrideType>j__TPar>.Default.GetHashCode(this.<OverrideType>i__Field);
        return ((-1521134295 * num) + EqualityComparer<<EntityType>j__TPar>.Default.GetHashCode(this.<EntityType>i__Field));
    }

    [DebuggerHidden]
    public override string ToString()
    {
        StringBuilder builder = new StringBuilder();
        builder.Append("{ OverrideType = ");
        builder.Append(this.<OverrideType>i__Field);
        builder.Append(", EntityType = ");
        builder.Append(this.<EntityType>i__Field);
        builder.Append(" }");
        return builder.ToString();
    }

    public <EntityType>j__TPar EntityType
    {
        get
        {
            return this.<EntityType>i__Field;
        }
    }

    public <OverrideType>j__TPar OverrideType
    {
        get
        {
            return this.<OverrideType>i__Field;
        }
    }
}
  • 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-12T22:28:39+00:00Added an answer on May 12, 2026 at 10:28 pm

    The term often used for the names with <> in them are unspeakable names – because they’re not valid C#. This prevents them from clashing with non-compiler-generated names, and stops you from trying to reference them in C#.

    Some things which may cause them:

    • Iterator blocks generate nested types to implement them.

    • Array initializers such as:

      int[] x = new int[] { 1, 2, 3 };
      

      will generate a <PrivateImplementationDetails>{...} class. (But only for certain types.)

    • Lambda expressions may create new methods and new types to implement the logic, and static variables used to cache delegates and expression trees where possible

    • If you compile with debugging information turned on, collection and object initializers such as:

      List<string> list = new List<string> { "hello", "there" }`)
      Button button = new Button { Text = "Hi" };
      

      will cause local variables with unspeakable names to be generated. (They’re used to hold the temporary value while the properties are being assigned and items being added, before the assignment to the real variable occurs.)

    • Dynamic code in C# 4 creates all kinds of weird and wonderful things

    If you turn the “optimization” level up in Reflector (View / Options / Disassembler) it will normally do its best to give you something like the original source code – turn the optimization off for an interesting experience 🙂

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

Sidebar

Related Questions

I'm attempting to recover the data from a specific table that exists in a
Attempting to upgrade from PHP 5.3 to 5.4 using a tutorial found at http://www.how2centos.com/installing-php-5-4-on-centos-5-8/
After attempting to install Ogre3d from source for Linux, it all built properly but
Attempting to use the data series from this example no longer passes the JSONLint
Attempting to decide on how to implement our RPC on the server side. From
Attempting to set up Samba + OpenLDAP using nss_ldap. After joining Windows7 to Samba
Attempting to find printers / shares in Active Directory using C#. This is my
Attempting to run adt from an SSH session results in: Exception in thread main
Attempting to print out a list of values from 2 different variables that are
Attempting to deploy a MOSS solution to a UAT server from dev server 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.