📄 class1.cs
字号:
using System;
using System.IO;
using System.Diagnostics;
namespace TestPath
{
class TestPathApp
{
[STAThread]
static void Main(string[] args)
{
Process p = Process.GetCurrentProcess();
ProcessModule pm = p.MainModule;
string s = pm.ModuleName;
Console.WriteLine(
Path.GetFullPath(s));
Console.WriteLine(
Path.GetFileName(s));
Console.WriteLine(
Path.GetFileNameWithoutExtension(s));
Console.WriteLine(
Path.GetDirectoryName(
Directory.GetCurrentDirectory()));
Console.WriteLine(
Path.GetPathRoot(
Directory.GetCurrentDirectory()));
Console.WriteLine(
Path.GetTempPath());
Console.WriteLine(
Path.GetTempFileName());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -