Partager via


VertexDeclaration.GetDeclaration() Method (Microsoft.DirectX.Direct3D)

Gets the vertex shader declaration.

Definition

Visual Basic Public Function GetDeclaration() As VertexElement()
C# public VertexElement[] GetDeclaration();
C++ public:
array<VertexElement>^ GetDeclaration();
JScript public function GetDeclaration() : VertexElement[];

Return Value

Microsoft.DirectX.Direct3D.VertexElement[]
Array of vertex elements that make up a vertex shader declaration. The array ends with the value in the VertexDeclarationEnd field.

Remarks

The size of the array includes the VertexDeclarationEnd field, which ends the declaration. This means that the array count is actually higher than the number of valid vertex elements by one.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.