NAnt SDK Documentation - v0.92 |

# OperatingSystemFunctions.ToString Method (OperatingSystem)

Converts the value of the specified operating system to its equivalent String representation.

[Visual Basic]
<Function(Name:="to-string")>
Overloads Public Shared Function ToString( _
ByVal operatingSystem As OperatingSystem _
) As String
[C#]
[Function(Name="to-string")]
public static string ToString(
OperatingSystem operatingSystem
);

#### Parameters

operatingSystem
  The operating system.

#### Return Value

The String representation of operatingSystem.

#### Example

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

#### See Also

OperatingSystemFunctions Class | NAnt.Core.Functions Namespace | OperatingSystemFunctions.ToString Overload List | GetOperatingSystem