VB获取程序部署目录

前端之家收集整理的这篇文章主要介绍了VB获取程序部署目录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
//Get the assembly informationSystem.Reflection.Assembly
assemblyInfo = System.Reflection.Assembly.GetExecutingAssembly();

//Location is where the assembly is run from 
string assemblyLocation = assemblyInfo.Location;

//CodeBase is the location of the ClickOnce deployment files
Uri uriCodeBase = new Uri(assemblyInfo.CodeBase);
string ClickOnceLocation = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString());

猜你在找的VB相关文章