OperatingSystem(PlatformID, Version) 构造函数
定义
使用指定的平台标识符值和版本对象来初始化 OperatingSystem 类的新实例。Initializes a new instance of the OperatingSystem class, using the specified platform identifier value and version object.
public:
OperatingSystem(PlatformID platform, Version ^ version);
public OperatingSystem (PlatformID platform, Version version);
new OperatingSystem : PlatformID * Version -> OperatingSystem
Public Sub New (platform As PlatformID, version As Version)
参数
- platform
- PlatformID
PlatformID 值之一,指示操作系统平台。One of the PlatformID values that indicates the operating system platform.
- version
- Version
Version 对象,指示操作系统的版本。A Version object that indicates the version of the operating system.
例外
version 为 null。version is null.
platform 不是一个 PlatformID 枚举值。platform is not a PlatformID enumeration value.
调用方说明
如果使用 OperatingSystem 类检索有关运行时操作系统的信息,则不应调用此构造函数来实例化 OperatingSystem 对象。If you are using the OperatingSystem class to retrieve information about the runtime operating system, you should not call this constructor to instantiate an OperatingSystem object. 相反,您可以 OperatingSystem 从属性中检索描述操作系统的对象 OSVersion 。Instead, you can retrieve an OperatingSystem object that describes the operating system from the OSVersion property.