---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/XmpValue
---

# XmpValue

## Overview

`XmpValue` is a class in Aspose.PDF FOSS for .NET.

Represents a typed XMP metadata value.

This class provides 18 methods for working with XmpValue objects in .NET programs.
Available methods include: `ToArray`, `ToDateTime`, `ToDictionary`, `ToDouble`, `ToField`, `ToInteger`, `ToNamedValue`, `ToNamedValues`, `ToRaw`, `ToString`, `ToStringValue`, `ToStructure`, and 1 additional methods.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `IsArray`, `IsDateTime`, `IsDouble`, `IsField`, `IsInteger`, `IsNamedValue`, and 4 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `IsInteger` | `bool` | Read | Whether the value is an integer. |
| `IsDouble` | `bool` | Read | Whether the value is a double. |
| `IsDateTime` | `bool` | Read | Whether the value is a DateTime. |
| `IsString` | `bool` | Read | Whether the value is a string (and not a number or date). |
| `IsArray` | `bool` | Read | Whether the value is an array of XmpValues. |
| `IsField` | `bool` | Read | Whether the value is a single named field (an XmpField instance). |
| `IsNamedValue` | `bool` | Read | Whether the value is a named-value pair (KeyValuePair&lt;string, XmpValue&gt;). |
| `IsNamedValues` | `bool` | Read | Whether the value is an array of named-value pairs. |
| `IsRaw` | `bool` | Read | Whether the value is a raw XML node. |
| `IsStructure` | `bool` | Read | Whether the value is a struct (a Dictionary&lt;string, XmpValue&gt; or an XmpField[]). |

## Methods

| Signature | Description |
|-----------|-------------|
| `XmpValue(value: int)` | Create an XmpValue from an integer. |
| `XmpValue(value: double)` | Create an XmpValue from a double. |
| `XmpValue(value: DateTime)` | Create an XmpValue from a DateTime. |
| `XmpValue(value: string)` | Create an XmpValue from a string. |
| `XmpValue(array: XmpValue[])` | Create an XmpValue from an array of XmpValues. |
| `ToInteger()` | Convert to integer. |
| `ToDouble()` | Convert to double. |
| `ToDateTime()` | Convert to DateTime. |
| `ToArray()` | Convert to XmpValue[]. |
| `ToDictionary()` | Convert to Dictionary&lt;string, XmpValue&gt;. |
| `ToField()` | Convert to a single XmpField. |
| `ToNamedValue()` | Convert to a single named-value pair. |
| `ToNamedValues()` | Convert to an array of named-value pairs. |
| `ToRaw()` | Get the underlying raw XmlNode, or null when the value isn't IsRaw. |
| `ToStructure()` | Convert to an XmpField[] (a struct, in XMP terms). |
| `ToStringValue()` | Convert to string representation suitable for XMP serialization. |
| `ToString()` | Calls ToString on this XmpValue instance. |
| `ToString(formatProvider: IFormatProvider)` | Format with a culture-specific provider. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)