Summary
Converts the value of the specified operating system to its equivalent
string
representation.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Functions - Containing Type
- Operating
System Functions
Syntax
[Function("to-string")]
public static string ToString(OperatingSystem operatingSystem)
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. |
Parameters
Name | Type | Description |
---|---|---|
operatingSystem | OperatingSystem | The operating system. |
Return Value
Type | Description |
---|---|
string |
The string representation of
operatingSystem.
|
See Also
- NAnt.Core.Functions.EnvironmentFunctions.GetOperatingSystem