# DocumentEventArgs<T> class

Namespace: [Grasshopper2.Doc](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.doc.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public abstract class DocumentEventArgs<T> : EventArgs
```

Generic class for document events.

**Type parameters:**

- `T`

**Derived types:** [DocumentModifiedEventArgs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentmodifiedeventargs.md), [DocumentStateEventArgs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentstateeventargs.md)

## Constructors

- [DocumentEventArgs<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documenteventargs-1/ctor.md): Construct new event arguments.

## Fields

- [_after](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documenteventargs-1/after.md)
- [_before](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documenteventargs-1/before.md)

## Properties

- [Document](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documenteventargs-1/document.md): Gets the document that raised this event.
- [NewState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documenteventargs-1/newstate.md): Gets the new state.
- [Oldstate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documenteventargs-1/oldstate.md): Gets the old state that existed before the event.
