winform获取当前名称实例汇总
作者:shichen2014 时间:2023-03-22 17:03:18
本文实例汇总了winform获取当前名称的方法。分享给大家供大家参考。具体方法如下:
// 获取程序的基目录。
System.AppDomain.CurrentDomain.BaseDirectory
// 获取模块的完整路径。
System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
// 获取和设置当前目录(该进程从中启动的目录)的完全限定目录。
System.Environment.CurrentDirectory
// 获取应用程序的当前工作目录。
System.IO.Directory.GetCurrentDirectory()
// 获取和设置包括该应用程序的目录的名称。
System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase
// 获取启动了应用程序的可执行文件的路径。
System.Windows.Forms.Application.StartupPath
// 获取启动了应用程序的可执行文件的路径及文件名
System.Windows.Forms.Application.ExecutablePath
希望本文所述对大家的C#程序设计有所帮助。
标签:winform,获取,名称
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Android WorkManager浅谈
2023-03-24 11:26:46
![](https://img.aspxhome.com/file/2023/4/100654_0s.jpg)
Android实现文件下载进度显示功能
2023-12-26 00:42:28
![](https://img.aspxhome.com/file/2023/4/130404_0s.png)
Java高级架构之FastDFS分布式文件集群详解
2023-07-23 14:57:50
![](https://img.aspxhome.com/file/2023/0/114060_0s.png)
使用@SpringBootTest注解进行单元测试
2021-09-27 04:02:04
C语言malloc分配问题详解
2023-07-22 05:10:34
Kotlin利用Regex如何构建正则表达式详解
2022-12-25 18:31:10
Java遗传算法之冲出迷宫
2022-01-12 21:34:58
浅析java 归并排序算法
2022-01-20 09:59:50
![](https://img.aspxhome.com/file/2023/4/80944_0s.png)
Android EditText限制输入整数和小数的位数的方法示例
2022-12-23 05:15:30
Java实战之在线寄查快递系统的实现
2023-08-10 21:52:23
![](https://img.aspxhome.com/file/2023/2/58182_0s.png)
Android中ActionBar以及menu的代码设置样式
2023-11-24 03:34:33
![](https://img.aspxhome.com/file/2023/2/106032_0s.png)
Android中回调接口的使用介绍
2022-07-24 02:45:07
Java实现FTP批量大文件上传下载篇2
2021-07-22 02:30:31
![](https://img.aspxhome.com/file/2023/3/83123_0s.jpg)
详解SpringMVC和MyBatis框架开发环境搭建和简单实用
2022-03-11 13:54:51
![](https://img.aspxhome.com/file/2023/8/118818_0s.png)
SpringBoot控制配置类加载顺序方式
2022-08-18 04:31:15
![](https://img.aspxhome.com/file/2023/8/129228_0s.png)
Java中构造函数,set/get方法和toString方法使用及注意说明
2021-07-15 13:01:39
![](https://img.aspxhome.com/file/2023/2/116192_0s.png)
Runtime.getRuntime().exec 路径包含空格的解决
2023-05-15 23:54:32
![](https://img.aspxhome.com/file/2023/6/83056_0s.png)
java实现科学计算器的全过程与代码
2022-04-09 07:49:52
![](https://img.aspxhome.com/file/2023/0/132170_0s.png)
JDK源码中一些实用的“小技巧”总结
2022-10-21 08:17:50
![](https://img.aspxhome.com/file/2023/1/68161_0s.jpg)
Android开发中应用程序分享功能实例
2021-05-27 20:38:46