Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​OperatingSystem

Assembly: System.Runtime

Inheritance: object → OperatingSystem

Represents information about an operating system, such as the version and platform identifier. This class cannot be inherited.

Properties

public PlatformID
Platform
Gets a <see cref="T:System.PlatformID" /> enumeration value that identifies the operating system platform.
public string
ServicePack
Gets the service pack version represented by this <see cref="T:System.OperatingSystem" /> object.
public Version
Version
Gets a <see cref="T:System.Version" /> object that identifies the operating system.
public string
VersionString
Gets the concatenated string representation of the platform identifier, version, and service pack that are currently installed on the operating system.

Methods

public object
Clone​()
Returns An <see cref="T:System.OperatingSystem" /> object that is a copy of this instance.
Creates an <see cref="T:System.OperatingSystem" /> object that is identical to this instance.
public void
GetObjectData​(SerializationInfo info, StreamingContext context)
info The object to populate with serialization information.
context The place to store and retrieve serialized data. Reserved for future use.
Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with the data necessary to deserialize this instance.
public string
ToString​()
Returns The string representation of the values returned by the <see cref="P:System.OperatingSystem.Platform" /> , <see cref="P:System.OperatingSystem.Version" /> , and <see cref="P:System.OperatingSystem.ServicePack" /> properties.
Converts the value of this <see cref="T:System.OperatingSystem" /> object to its equivalent string representation.
public bool
Equals​(object obj)
Inherited from object
obj The object to compare with the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
Determines whether the specified object is equal to the current object.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public int
GetHashCode​()
Inherited from object
Returns A hash code for the current object.
Serves as the default hash function.
public Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .