NAnt SDK Documentation - v0.92 |

# ElementNameAttribute Class

Indicates that class should be treated as a NAnt element.

For a list of all members of this type, see ElementNameAttribute Members.

System.Object
System.Attribute
NAnt.Core.Attributes.ElementNameAttribute
NAnt.Core.Attributes.TaskNameAttribute

[Visual Basic]
<AttributeUsage(Inherited:=False, ValidOn:=AttributeTargets.Class, AllowMultiple:=False)>
Public Class ElementNameAttribute
Inherits Attribute
[C#]
[AttributeUsage(Inherited=False, ValidOn=AttributeTargets.Class, AllowMultiple=False)]
public class ElementNameAttribute : Attribute

#### Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

#### Remarks

Attach this attribute to a subclass of Element to have NAnt be able to recognize it. The name should be short but must not confict with any other element already in use.

#### Requirements

Namespace: NAnt.Core.Attributes

Assembly: NAnt.Core (in NAnt.Core.dll)

#### See Also

ElementNameAttribute Members | NAnt.Core.Attributes Namespace