# MaterialTable class

Namespace: [Rhino.DocObjects.Tables](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.docobjects.tables.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public sealed class MaterialTable : RhinoDocCommonTable<Material>, ICollection<Material>
```

## Properties

- [ComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/componenttype.md)
- [CurrentMaterialIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/currentmaterialindex.md): At all times, there is a "current" material. Unless otherwise specified, new objects are assigned to the current material. The current material is never locked, hidden, or deleted.
- [CurrentMaterialSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/currentmaterialsource.md): Gets or sets the current material source.

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/item.md): Conceptually, the material table is an array of materials. The operator[] can be used to get individual materials. A material is either active or deleted and this state is reported by Material.IsDeleted.

## Methods

- [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/add.md): (3 overloads) Adds a new material to the table based on the default material.
- [Delete](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/delete.md)
- [DeleteAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/deleteat.md): Removes a material at a specific position from this material table.
- [Find](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/find.md): (3 overloads) Finds a material with a matching id.
- [FindIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/findindex.md): Retrieves a Material object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.
- [Modify](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/modify.md): Modify material settings.
- [ResetMaterial](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/resetmaterial.md)
- [ICollection<Material>.Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.materialtable/system-collections-generic-icollection-rhino-docobjects-material-add.md)

## Inherited Members

- From [RhinoDocCommonTable<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.rhinodoccommontable-1.md): [Document](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.rhinodoccommontable-1/document.md)
- From [CommonComponentTable<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1.md): [Count](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1/count.md), [Clear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1/clear.md), [FindId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1/findid.md), [GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1/getenumerator.md)
