> ## 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.

# XmlSerializableAttribute

> Instructs the XmlEssentials source generator to generate source code for serializing and deserializing instances of the specified type and the types in its o...

## Definition

**Assembly:** CloudNimble.XmlEssentials.dll

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

**Inheritance:** System.Attribute

## Syntax

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

## Summary

Instructs the XmlEssentials source generator to generate source code for serializing and deserializing instances of
the specified type and the types in its object graph. This class cannot be inherited.

## Usage

Apply `[XmlSerializable]` to a partial class that derives from `XmlSerializerContext`, once for each type you pass to the serializer. The source generator reads the attributes at compile time and adds a matching `XmlTypeInfo<T>` property to the class.

```csharp theme={"dark"}
[XmlSerializable<Order>]
public partial class OrderXmlContext : XmlSerializerContext
{
}
```

List the root types only. The generator follows the properties of each type, so listing `Order` also covers the `OrderLine` type of its `Lines` property, and the context gets an `OrderLine` property too.

The generated property is named after the type. Set `TypeInfoPropertyName` to choose another name, for example when two listed types have the same name in different namespaces:

```csharp theme={"dark"}
[XmlSerializable<OrderLine>(TypeInfoPropertyName = "Line")]
public partial class OrderLineXmlContext : XmlSerializerContext
{
}
```

```csharp theme={"dark"}
var line = new OrderLine { Sku = "KB-01", Quantity = 1 };

string xml = XmlSerializer.Serialize(line, OrderLineXmlContext.Default.Line);
output.WriteLine(xml);
```

The code produces the following output:

```xml theme={"dark"}
<?xml version="1.0" encoding="utf-8"?><OrderLine><Quantity>1</Quantity><Sku>KB-01</Sku></OrderLine>
```

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

The attribute is the counterpart of `JsonSerializableAttribute` in System.Text.Json.

## Remarks

Place the attribute on a partial class that derives from [XmlSerializerContext](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlSerializerContext.md). The type is a type
argument, so the compiler checks it and it may be any closed type, an array or a collection included. This attribute
is analogous to `JsonSerializableAttribute` in `System.Text.Json`, which takes the type as a constructor
argument.

## Type Parameters

* `T` - The type to generate source code for.

## Examples

```csharp theme={"dark"}
[XmlSerializable<Person>]
[XmlSerializable<Person[]>]
[XmlSerializable<Dictionary<string, Person>>(TypeInfoPropertyName = "PeopleByName")]
internal partial class AppXmlContext : XmlSerializerContext
{
}
```

## Considerations

* **The class must be `partial` and derive from `XmlSerializerContext`.** Otherwise the generator reports `XMLESS001`.
* **`GenerationMode` overrides the mode of the context for the listed type.** A value other than `Default` applies to the type the attribute lists. A type listed with `Default`, and a type the generator reaches from a listed type, takes the mode from `[XmlSourceGenerationOptions]` on the context.
* **Metadata and a write fast path are generated only for object types.** For an enumeration, a collection, or a dictionary you list, such as `List<Order>`, the property returns type info that the runtime library creates from the type arguments the generator names, with no reflection. For a simple value you list, such as `int`, the property returns the built-in type info.
* **A listed type is checked at compile time.** See [Understand the diagnostics](https://easyaf.nimbleapps.cloud/xmlessentials/guides/source-generation.md#understand-the-diagnostics) for the errors the generator reports.
* **The attribute does nothing at run time.** The reflection resolver doesn't read it.

## Constructors

### &#x20;.ctor

#### Syntax

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

### &#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;GenerationMode

Gets or sets the mode that indicates what the source generator generates for the type.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.Text.Xml.Serialization.XmlSourceGenerationMode GenerationMode { get; set; }
```

#### Property Value

Type: `CloudNimble.Text.Xml.Serialization.XmlSourceGenerationMode`
A bitwise combination of the enumeration values that specifies what is generated for the type. The default is
[XmlSourceGenerationMode.Default](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlSourceGenerationMode.md).

#### Remarks

A value other than [XmlSourceGenerationMode.Default](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlSourceGenerationMode.md) overrides the
[XmlSourceGenerationOptionsAttribute.GenerationMode](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlSourceGenerationOptionsAttribute.md#generationmode) of the context for this type. The types reached
from it take the mode of the context.

### &#x20;Type

Gets the type to generate source code for.

#### Syntax

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

#### Property Value

Type: `System.Type`
The type that the context can serialize and deserialize, which is *T*.

### &#x20;TypeId Inherited Virtual

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

#### Syntax

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

#### Property Value

Type: `object`

### &#x20;TypeInfoPropertyName

Gets or sets the name of the property for the generated `XmlTypeInfo`1\` for the type on the generated,
derived [XmlSerializerContext](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlSerializerContext.md) type.

#### Syntax

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

#### Property Value

Type: `string?`
The name of the generated property. If the value is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or empty, the name is made from the
name of the type and the names of its type arguments. The default is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null).

## 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.XmlSerializerContext
* CloudNimble.Text.Xml.Serialization.XmlSourceGenerationOptionsAttribute
* CloudNimble.Text.Xml.Serialization.XmlSourceGenerationMode
* CloudNimble.Text.Xml.Serialization.XmlTypeInfo


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