Summary
Gets an
System.OperatingSystem
object that represents the
current operating system.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Functions - Containing Type
- EnvironmentFunctions
Syntax
[Function("get-operating-system")]
public static OperatingSystem GetOperatingSystem()
Examples
Output string representation of the current operating system.
<echo message="OS=${operating-system::to-string(environment::get-operating-system())}" />
If the operating system is Windows 2000, the output is:
Microsoft Windows NT 5.0.2195.0
Attributes
Type | Description |
---|---|
FunctionAttribute | Indicates that the method should be exposed as a function in NAnt build files. |
Return Value
Type | Description |
---|---|
OperatingSystem |
An System.OperatingSystem object that contains the current
platform identifier and version number.
|
See Also
- NAnt.Core.Functions.OperatingSystemFunctions