Sdílet prostřednictvím


VertexBufferContent.SizeOf Method

Note

This method is available only when developing for Windows.

Gets the size of the specified type, in bytes.

Syntax

'Declaration
Public Shared Function SizeOf ( _
         type As Type _
) As Integer 
public static int SizeOf (
         Type type
)
public:
static int SizeOf(
         Type type
)

Parameters

  • type
    Type: Type
    The type.

Return Value

Type: Int32
The size of the specified type, in bytes.

Remarks

Call this method to compute offset parameters for the Write method. If the specified data type cannot be packed into a vertex buffer—for example, if type is not a valid value type—a NotSupportedException is thrown.

Requirements

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Processors

Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

See Also

Reference

VertexBufferContent Class
VertexBufferContent Members
Microsoft.Xna.Framework.Content.Pipeline.Processors Namespace

Platforms

Windows 7, Windows Vista, Windows XP