---
Product: Aspose.3D
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/3d/net/VertexDeclaration
---

# VertexDeclaration

## Overview

`VertexDeclaration` is a class in Aspose.3D FOSS for .NET.
Inherits from: `IEnumerable`, `IEquatable`, `IComparable`.

VertexDeclaration.VertexDeclaration creates a new, empty vertex declaration instance.

This class provides 8 methods for working with VertexDeclaration objects in .NET programs.
Available methods include: `AddField`, `Clear`, `CompareTo`, `Equals`, `GetEnumerator`, `GetHashCode`, `ToString`, `VertexDeclaration`.
All public members are accessible to any .NET application after installing the Aspose.3D FOSS for .NET package.
Properties: `Count`, `Sealed`, `Size`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Sealed` | `bool` | Read | Gets the sealed. |
| `Count` | `int` | Read | Gets the count. |
| `Size` | `int` | Read | Gets the size. |

## Methods

| Signature | Description |
|-----------|-------------|
| `VertexDeclaration()` | Creates a new, empty vertex declaration instance |
| `Clear()` | Removes all fields from the declaration, resetting it to empty |
| `AddField(dataType: VertexFieldDataType, semantic: VertexFieldSemantic, index: int, alias: string)` | Adds a vertex field with the given type, semantic, index and alias |
| `GetHashCode()` | Returns a hash code based on the declaration's contents |
| `Equals(obj: object?)` | Determines whether the given object is an equal vertex declaration |
| `Equals(other: VertexDeclaration)` |  |
| `CompareTo(other: VertexDeclaration)` | Compares this declaration to another for sorting order |
| `ToString()` | Returns a string representation of the vertex declaration |
| `GetEnumerator()` | Provides an iterator over the declaration's fields |

## See Also

- [Aspose.3D — Enterprise API Reference](https://reference.aspose.com/3d/)