2

Assuming we have a method defined as below.

public class SomeClass
{
    [My("beautifulName")]
    public void DoSomeThing()
    {
         // whatever.
    }
}

public MyAttribute : Attribute
{
    public string Name { get; init; }
    public MyAttribute(string name) => Name = name;
}

Now we got a memory dump of this application, we can use ClrMD to find the SomeClass type easily, then we can easily find the DoSomeThing ClrMethod. Now, how can I find the corresponding MyAttribute instance and get the beautifulName value?

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
Ruikuan
  • 31
  • 5

0 Answers0