TextureCollection.Item Property

Gets or sets the Texture at the specified sampler number.

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


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

Property Value

The Texture at the specified index.


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


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


Xbox 360, Windows 7, Windows Vista, Windows XP