开发者

How to restore information about partial class from DLL?

开发者 https://www.devze.com 2023-01-15 12:19 出处:网络
DLL contains partial class DisPart defined in two places: public partial class DisPart { public static string s;

DLL contains partial class DisPart defined in two places:

public partial class DisPart
{
    public static string s;
}


public partial class DisPart
{
    public static int i;
}

Disassembling the DLL in Reflector results in:

public class DisPart
{
    public static int i;
    public static string s;
}

Is there any possibility t开发者_C百科o restore information:

1)whether the class was partial?

2)how the class's members definitions were divided ?


The PDB file would probably indicate both of these, as it will contain line number information - at least for the methods (and I'd expect for variables too). I don't expect it would be in the DLL itself. I also don't know how easy it would be to discover even if you had the PDB, to be honest - I don't know what the format of a PDB file is.


No, the partial modifier is only for the use of the maker of the class, so that it can be separated across multiple files. At compile time, the parts of the class are fused together.

0

精彩评论

暂无评论...
验证码 换一张
取 消