NAnt SDK Documentation - v0.92 |

# TaskNameAttribute Constructor

Initializes a new instance of the TaskNameAttribute with the specified name.

[Visual Basic]
Public Sub New( _
ByVal name As String _
)
[C#]
public TaskNameAttribute(
string name
);

#### Parameters

name
  The name of the task.

#### Exceptions

Exception Type | Condition
--- | ---
ArgumentNullException | name is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeException | name is a zero-length String.

#### See Also

TaskNameAttribute Class | NAnt.Core.Attributes Namespace