SpecialDirectories.Programs 属性

定义

获取指向 Programs 目录的路径名称。Gets a path name pointing to the Programs directory.

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

属性值

String

指向 Programs 目录的路径。The path to the Programs directory.

例外

路径为空,通常是因为操作系统不支持该目录。The path is empty, usually because the operating system does not support the directory.

示例

此示例显示中程序目录的路径 MessageBoxThis example displays the path for the Programs directory in a MessageBox.

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

注解

SpecialDirectories对象包含指向经常引用的目录的路径。The SpecialDirectories object contains paths to commonly referenced directories. Program 目录包含用户的程序组。The Programs directory contains the user's program groups.

适用于

另请参阅