NAnt SDK Documentation - v0.85-nightly-2005-11-09

EnvironmentFunctions.GetOperatingSystem Method 

[This is preliminary documentation and subject to change.]

Gets an OperatingSystem object that represents the current operating system.

[Visual Basic]
<Function(Name:="get-operating-system")>
Public Shared Function GetOperatingSystem() As OperatingSystem
[C#]
[Function(Name="get-operating-system")]
public static OperatingSystem GetOperatingSystem();

Return Value

An OperatingSystem object that contains the current platform identifier and version number.

Remarks

Missing <remarks> documentation for M:NAnt.Core.Functions.EnvironmentFunctions.GetOperatingSystem

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

EnvironmentFunctions Class | NAnt.Core.Functions Namespace | OperatingSystemFunctions