Share via


TextureCollection.Item Property

Gets or sets the Texture at the specified sampler number.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public Texture this [
         int index
] { get; set; }

Property Value

The Texture at the specified index.

Exceptions

Exception type Condition
InvalidOperationException The sampler number is invalid. It is either less than zero or greater than the maximum number of textures available for the graphics device.
ObjectDisposedException Item was called after the GraphicsDevice was disposed.

See Also

Reference

GraphicsDevice.SamplerStates Property
GraphicsDevice.Textures Property
GraphicsDevice.VertexTextures Property
TextureCollection Class
TextureCollection Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista