您可以使用Assembly.GetExecutingAssembly().Location来获取当前执行的程序集路径。示例如下:
using System;using System.Reflection;class Program{ static void Main() { string assemblyPath = Assembly.GetExecutingAssembly().Location; Console.WriteLine("Assembly Path: " + assemblyPath); }}这将打印出当前执行的程序集的路径。


