# GH_State class

Namespace: [Grasshopper.Kernel](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.kernel.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_State : GH_ISerializable
```

Represents a single recorded document state. A state contains values for an arbitrary set of objects inside the document.

## Constructors

- [GH_State](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/ctor.md): (2 overloads)

## Properties

- [LastModified](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/lastmodified.md): Gets the date at which this state was last modified.
- [Name](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/name.md): Gets or sets the name of this state.
- [StateCount](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/statecount.md): Gets the number of items stored in the state database.
- [StateData](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/statedata.md): Gets a pointer to the internal database of states.

## Indexers

- [Data](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/item.md): (2 overloads) Gets the state data stored under the specified ID

## Methods

- [AddStateObject](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/addstateobject.md): Append a new object to the database.
- [ClearStates](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/clearstates.md): Removes all items from the state database.
- [Read](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/read.md)
- [RemoveStateObject](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/removestateobject.md): Remove an object from the database.
- [Write](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-state/write.md)
