> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.nimbleapps.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# XmlElementAttribute

> Specifies that a member is serialized as a child element of type *T*. This class cannot be inherited.

## Definition

**Assembly:** CloudNimble.XmlEssentials.dll

**Namespace:** CloudNimble.Text.Xml.Serialization

**Inheritance:** CloudNimble.Text.Xml.Serialization.XmlElementAttribute

## Syntax

```csharp theme={"dark"}
CloudNimble.Text.Xml.Serialization.XmlElementAttribute<T>
```

## Summary

Specifies that a member is serialized as a child element of type *T*. This class cannot be inherited.

## Usage

Apply `[XmlElement]` to a property or field to say that it is a child element and, optionally, to set the element's name, namespace, or order. A member is an element by default, so you need the attribute in three cases:

* To name the element, as an alternative to `[XmlPropertyName]`.
* To keep one member as an element when `XmlSerializerOptions.DefaultPropertyMapping` is `XmlPropertyMapping.Attribute`.
* To set `Namespace` or `Order`.

```csharp theme={"dark"}
[XmlElement("unit-price")]
public decimal UnitPrice { get; set; }
```

On a collection that has no `[XmlArray]`, the name applies to each repeated item:

```csharp theme={"dark"}
public sealed class NewsFeed
{
    public string? Title { get; set; }

    [XmlElement("Entry")]
    public List<string> Entries { get; set; } = [];
}
```

```csharp theme={"dark"}
var feed = new NewsFeed { Title = "Releases", Entries = ["1.0.0 is out", "1.0.1 fixes a typo"] };
var options = new XmlSerializerOptions { WriteIndented = true, NewLine = "\n", OmitXmlDeclaration = true };

string xml = XmlSerializer.Serialize(feed, options);
output.WriteLine(xml);
```

The code produces the following output:

```xml theme={"dark"}
<NewsFeed>
  <Title>Releases</Title>
  <Entry>1.0.0 is out</Entry>
  <Entry>1.0.1 fixes a typo</Entry>
</NewsFeed>
```

[View the complete sample on GitHub](https://github.com/CloudNimble/XmlEssentials/blob/main/src/CloudNimble.XmlEssentials.Samples/12_SerializeCollections.cs)

## Type Parameters

* `T` - The type that is serialized with the element name.

## Considerations

* `[XmlPropertyName]` on the same member takes precedence over `ElementName`, and `[XmlPropertyOrder]` takes precedence over `Order`.
* A name set here isn't converted by a naming policy.
* `Order` follows the rules of `[XmlPropertyOrder]`: values of zero or more are written first in ascending order, and a negative value, the default, means the order isn't set.
* A member can't be both an element and something else. `[XmlElement]` together with `[XmlAttribute]`, `[XmlText]`, or `[XmlCData]` throws a `NotSupportedException` the first time the type is used.
* Several `[XmlElement<T>]` on one member make a choice of elements: each element name stands for a type, a value is written under the element of its type, and an element is read as the type of its name. On a collection, each item is written under the element of its own type. A value of the member's own type is written under the member's name. When two elements hold the same type, declare the member as `XmlNamedValue`, or a collection of it, so each value carries the name of its element. See [Polymorphism](https://easyaf.nimbleapps.cloud/xmlessentials/guides/polymorphism.md).
* A member can have one `[XmlElement]` without a type argument. A second one, or one next to `[XmlElement<T>]`, throws a `NotSupportedException` the first time the type is used.

## Constructors

### &#x20;.ctor

Initializes a new instance of the `XmlElementAttribute`1\` class that uses the default element name:
the member name, or the element name of *T* when the member has more than one of these attributes.

#### Syntax

```csharp theme={"dark"}
public XmlElementAttribute()
```

### &#x20;.ctor

Initializes a new instance of the `XmlElementAttribute`1\` class with the specified element name.

#### Syntax

```csharp theme={"dark"}
public XmlElementAttribute(string elementName)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `elementName` | `string` | The local name of the element. |

#### Exceptions

| Exception | Description |
| - | - |
| `ArgumentNullException` | *elementName* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |
| `ArgumentException` | *elementName* is empty or consists only of white-space characters. |

### &#x20;.ctor

Initializes a new instance of the `XmlElementAttribute`1\` class with the specified element name and namespace.

#### Syntax

```csharp theme={"dark"}
public XmlElementAttribute(string elementName, string namespaceUri)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `elementName` | `string` | The local name of the element. |
| `namespaceUri` | `string?` | The namespace URI of the element, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) to write the element with an unqualified name. |

#### Exceptions

| Exception | Description |
| - | - |
| `ArgumentNullException` | *elementName* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |
| `ArgumentException` | *elementName* is empty or consists only of white-space characters. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlElementAttribute`

Initializes a new instance of the [XmlElementAttribute](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlElementAttribute.md) class that uses the member name as the element name.

#### Syntax

```csharp theme={"dark"}
public XmlElementAttribute()
```

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlElementAttribute`

Initializes a new instance of the [XmlElementAttribute](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlElementAttribute.md) class with the specified element name.

#### Syntax

```csharp theme={"dark"}
public XmlElementAttribute(string elementName)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `elementName` | `string` | The local name of the element. |

#### Exceptions

| Exception | Description |
| - | - |
| `ArgumentNullException` | *elementName* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |
| `ArgumentException` | *elementName* is empty or consists only of white-space characters. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlElementAttribute`

Initializes a new instance of the [XmlElementAttribute](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlElementAttribute.md) class with the specified element name and namespace.

#### Syntax

```csharp theme={"dark"}
public XmlElementAttribute(string elementName, string namespaceUri)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `elementName` | `string` | The local name of the element. |
| `namespaceUri` | `string?` | The namespace URI of the element, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) to write the element with an unqualified name. |

#### Exceptions

| Exception | Description |
| - | - |
| `ArgumentNullException` | *elementName* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |
| `ArgumentException` | *elementName* is empty or consists only of white-space characters. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
protected Attribute()
```

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### &#x20;ElementName Inherited

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlElementAttribute`

Gets or sets the local name of the element.

#### Syntax

```csharp theme={"dark"}
public string ElementName { get; set; }
```

#### Property Value

Type: `string?`
The local name of the element. If the value is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or empty, the member name is used,
converted by the element naming policy. The default is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null).

#### Remarks

An [XmlPropertyNameAttribute](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlPropertyNameAttribute.md) on the same member takes precedence over this property.

### &#x20;IsNullable Inherited

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlElementAttribute`

Gets or sets a value that indicates whether the member is nillable.

#### Syntax

```csharp theme={"dark"}
public bool IsNullable { get; set; }
```

#### Property Value

Type: `bool`
[`true`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the member is nillable; otherwise, [`false`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). The default is [`false`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

#### Remarks

A member whose type is a reference type, a [Nullable\`1](https://learn.microsoft.com/dotnet/api/system.nullable-1), or a collection is nillable whatever this value is.

### &#x20;Namespace Inherited

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlElementAttribute`

Gets or sets the namespace URI of the element.

#### Syntax

```csharp theme={"dark"}
public string Namespace { get; set; }
```

#### Property Value

Type: `string?`
The namespace URI of the element. If the value is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), the element is written with an unqualified name,
so it is in the default namespace that is in scope. An empty string puts the element in no namespace.
The default is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null).

#### Remarks

An element in no namespace is written with `xmlns=""` where a default namespace is in scope, and
only an element in no namespace is read as the member.

### &#x20;Order Inherited

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlElementAttribute`

Gets or sets the order of the element among the child elements of the containing type.

#### Syntax

```csharp theme={"dark"}
public int Order { get; set; }
```

#### Property Value

Type: `int`
The order of the element. Lower values are written first. A negative value means the order is not set. The default is `-1`.

#### Remarks

An [XmlPropertyOrderAttribute](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlPropertyOrderAttribute.md) on the same member takes precedence over this property.

### &#x20;Type Override

#### Syntax

```csharp theme={"dark"}
public override System.Type Type { get; }
```

#### Property Value

Type: `System.Type`

### &#x20;Type Inherited Virtual

> [!NOTE]
>
> Inherited from `CloudNimble.Text.Xml.Serialization.XmlElementAttribute`

Gets the type that is serialized with [XmlElementAttribute.ElementName](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlElementAttribute.md#elementname).

#### Syntax

```csharp theme={"dark"}
public virtual System.Type Type { get; }
```

#### Property Value

Type: `System.Type?`
The type that the element name applies to, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if the type of the member is used.

### &#x20;TypeId Inherited Virtual

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public virtual object TypeId { get; }
```

#### Property Value

Type: `object`

## Methods

### &#x20;Equals Override

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public override bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetCustomAttribute Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute GetCustomAttribute(System.Reflection.MemberInfo element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.MemberInfo` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `System.Attribute?`

### &#x20;GetCustomAttribute Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute GetCustomAttribute(System.Reflection.MemberInfo element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.MemberInfo` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute?`

### &#x20;GetCustomAttribute Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute GetCustomAttribute(System.Reflection.ParameterInfo element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.ParameterInfo` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `System.Attribute?`

### &#x20;GetCustomAttribute Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute GetCustomAttribute(System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.ParameterInfo` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute?`

### &#x20;GetCustomAttribute Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute GetCustomAttribute(System.Reflection.Module element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Module` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `System.Attribute?`

### &#x20;GetCustomAttribute Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute GetCustomAttribute(System.Reflection.Module element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Module` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute?`

### &#x20;GetCustomAttribute Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute GetCustomAttribute(System.Reflection.Assembly element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Assembly` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `System.Attribute?`

### &#x20;GetCustomAttribute Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute GetCustomAttribute(System.Reflection.Assembly element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Assembly` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute?`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.MemberInfo element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.MemberInfo` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.MemberInfo element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.MemberInfo` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.MemberInfo element)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.MemberInfo` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.MemberInfo element, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.MemberInfo` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.ParameterInfo element)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.ParameterInfo` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.ParameterInfo element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.ParameterInfo` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.ParameterInfo` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.ParameterInfo element, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.ParameterInfo` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.Module element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Module` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.Module element)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Module` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.Module element, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Module` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.Module element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Module` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.Assembly element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Assembly` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.Assembly element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Assembly` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.Assembly element)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Assembly` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetCustomAttributes Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static System.Attribute[] GetCustomAttributes(System.Reflection.Assembly element, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Assembly` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `System.Attribute[]`

### &#x20;GetHashCode Override

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public override int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;IsDefaultAttribute Inherited Virtual

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public virtual bool IsDefaultAttribute()
```

#### Returns

Type: `bool`

### &#x20;IsDefined Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static bool IsDefined(System.Reflection.MemberInfo element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.MemberInfo` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `bool`

### &#x20;IsDefined Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static bool IsDefined(System.Reflection.MemberInfo element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.MemberInfo` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `bool`

### &#x20;IsDefined Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static bool IsDefined(System.Reflection.ParameterInfo element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.ParameterInfo` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `bool`

### &#x20;IsDefined Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static bool IsDefined(System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.ParameterInfo` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `bool`

### &#x20;IsDefined Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static bool IsDefined(System.Reflection.Module element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Module` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `bool`

### &#x20;IsDefined Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static bool IsDefined(System.Reflection.Module element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Module` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `bool`

### &#x20;IsDefined Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static bool IsDefined(System.Reflection.Assembly element, System.Type attributeType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Assembly` | - |
| `attributeType` | `System.Type` | - |

#### Returns

Type: `bool`

### &#x20;IsDefined Inherited

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public static bool IsDefined(System.Reflection.Assembly element, System.Type attributeType, bool inherit)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `element` | `System.Reflection.Assembly` | - |
| `attributeType` | `System.Type` | - |
| `inherit` | `bool` | - |

#### Returns

Type: `bool`

### &#x20;Match Inherited Virtual

> [!NOTE]
>
> Inherited from `System.Attribute`

#### Syntax

```csharp theme={"dark"}
public virtual bool Match(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

## Related APIs

* CloudNimble.Text.Xml.Serialization.XmlPropertyNameAttribute
* CloudNimble.Text.Xml.Serialization.XmlPropertyOrderAttribute
* CloudNimble.Text.Xml.Serialization.XmlAttributeAttribute
* CloudNimble.Text.Xml.Serialization.XmlTextAttribute
* CloudNimble.Text.Xml.Serialization.XmlArrayAttribute
* CloudNimble.Text.Xml.XmlPropertyMapping


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.