获取vb.net控制台exe中的启动路径 [英] Get the startup path in a vb.net console exe

查看:247
本文介绍了获取vb.net控制台exe中的启动路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取我的exe的启动路径(system.windows.forms.application.StartupPath)而不添加对system.windows.forms的引用?

How do get the startup path ( system.windows.forms.application.StartupPath ) of my exe without adding a reference to system.windows.forms?

推荐答案

你可以尝试

System.AppDomain.CurrentDomain.BaseDirectory

这适用于大多数情况。

which would work for most cases.

这篇关于获取vb.net控制台exe中的启动路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆