DriveType 枚举
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义驱动器类型常数,包括 CDRom、Fixed、Network、NoRootDirectory、Ram、Removable 和 Unknown。
public enum class DriveType
C#
public enum DriveType
C#
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum DriveType
type DriveType =
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type DriveType =
Public Enum DriveType
- 继承
- 属性
名称 | 值 | 说明 |
---|---|---|
CDRom | 5 | 驱动器是一个光盘设备,如 CD 或 DVD-ROM。 |
Fixed | 3 | 驱动器是一个固定磁盘。 |
Network | 4 | 驱动器是一个网络驱动器。 |
NoRootDirectory | 1 | 驱动器没有根目录。 |
Ram | 6 | 驱动器是一个 RAM 磁盘。 |
Removable | 2 | 驱动器是一个可移动存储设备,如 U 盘。 |
Unknown | 0 | 驱动器类型未知。 |
DriveType 由 DriveInfo 类用来指示驱动器类型。 它可与 属性一 DriveType 起使用。
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |