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

EnvironmentFunctions.VariableExists Method 

[This is preliminary documentation and subject to change.]

Gets a value indicating whether the specified environment variable exists.

[Visual Basic]
<Function(Name:="variable-exists")>
Public Shared Function VariableExists( _
   ByVal name As String _
) As Boolean
[C#]
[Function(Name="variable-exists")]
public static bool VariableExists(
   string name
);

Parameters

name
The environment variable that should be checked.

Return Value

true if the environment variable exists; otherwise, false.

Remarks

Missing <remarks> documentation for M:NAnt.Core.Functions.EnvironmentFunctions.VariableExists(System.String)

Example

Execute a set of tasks only if the "BUILD_DEBUG" environment variable is set.

                
            <if test="${environment::variable-exists('BUILD_DEBUG')}">
                ...
            </if>
                
              

See Also

EnvironmentFunctions Class | NAnt.Core.Functions Namespace