Assembly.GetExecutingAssembly 方法

https://learn.microsoft.com/zh-cn/dotnet/api/system.reflection.assembly.getexecutingassembly?redirectedfrom=MSDN&view=net-7.0#System_Reflection_Assembly_GetExecutingAssembly

命名空间:
System.Reflection
程序集:
netstandard.dll

获取包含当前执行的代码的程序集。

C#
public static System.Reflection.Assembly GetExecutingAssembly ();
 
 
Directory.GetParent(Assembly.GetExecutingAssembly().Location)
获取当前执行的代码的程序集的父地址
posted @ 2022-11-18 16:56  yinghualeihenmei  阅读(427)  评论(0编辑  收藏  举报