C#如何查看DLL文件中的成员

    科技2022-07-13  113

      在C#中经常需要调用DLL文件,需要查看DLL文件中的成员,查看DLL文件中的成员需要以下几个步骤:

    一、方法步骤

    1、首先启动vs的命令行工具

    2、输入命令ildasm,

    3、 选择“文件”-> “打开”

      找到你需要查看的DLL文件。

    4、选择“文件”->“转储树视图”

      另存到txt类型的文件中,如MyDLL_name.txt

    5、打开文本文件查看

      打开MyDLL_name.txt,可以看到树形的DLL文件所有类的成员信息

    ___[MOD] D:\C#程序文件夹\下载文件夹\LitJson.0.7.0\lib\LitJson.dll | M A N I F E S T |___[NSP] LitJson | |___[VCL] LitJson.ArrayMetadata | | | .class value private sequential ansi sealed beforefieldinit | | | extends [mscorlib]System.ValueType | | |___[FLD] field element_type : private class [mscorlib]System.Type | | |___[FLD] field is_array : private bool | | |___[FLD] field is_list : private bool | | |___[MET] method get_ElementType : class [mscorlib]System.Type() | | |___[MET] method get_IsArray : bool() | | |___[MET] method get_IsList : bool() | | |___[MET] method set_ElementType : void(class [mscorlib]System.Type) | | |___[MET] method set_IsArray : void(bool) | | |___[MET] method set_IsList : void(bool) | | |___[PTY] prop ElementType : instance class [mscorlib]System.Type() | | |___[PTY] prop IsArray : instance bool() | | |___[PTY] prop IsList : instance bool() | | | |___[ENU] LitJson.Condition

    二、参考资料

    1、猿问https://www.imooc.com/wenda/detail/449990

    Processed: 0.011, SQL: 8