Share via


SpecialDirectories.Desktop 属性

定义

获取指向 Desktop 目录的路径名称。

public:
 static property System::String ^ Desktop { System::String ^ get(); };
public static string Desktop { get; }
static member Desktop : string
Public Shared ReadOnly Property Desktop As String

属性值

Desktop 目录的路径。

例外

路径为空,通常是因为操作系统不支持该目录。

示例

此示例显示 中 MessageBox桌面目录的路径。

MsgBox(My.Computer.FileSystem.SpecialDirectories.Desktop)

注解

SpecialDirectories 对象包含常见引用目录的路径。

适用于

另请参阅