# IO class

Namespace: [GrasshopperIO](https://developer.rhino3d.com/api/gh2/namespace/grasshopperio.md) · Assembly: [GrasshopperIO](https://developer.rhino3d.com/api/gh2/assembly/grasshopperio.md)

```cs
public static class IO
```

Static methods for safe reading and writing to and from IStorable implementations.

## Methods

- [Duplicate](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/duplicate.md): (2 overloads, static) Duplicate an instance of an IStorable type using (de)serialization.
- [GetIoId](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/getioid.md): (static) Gets the value of the identifier attribute associated with a type. If the type doesn't have the IdentifierAttribute, an exception will be thrown.
- [GetIStorableConstructor](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/getistorableconstructor.md): (static) Gets the constructor of a type which takes a single IReader argument. If such a constructor does not exist null will be returned.
- [IsObsolete](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/isobsolete.md): (static) Gets the value of the identifier attribute associated with a type. If the type doesn't have the IdentifierAttribute, an exception will be thrown.
- [ReadNodeFromByteArray](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/readnodefrombytearray.md): (static) Read a node directly from a byte array.
- [ReadNodeFromFile](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/readnodefromfile.md): (static) Read a node from a file.
- [ReadNodeFromStream](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/readnodefromstream.md): (2 overloads, static) Read a node from a binary reader.
- [ReadStorableFromByteArray<T>](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/readstorablefrombytearray.md): (static) Deserialise a byte array into an IStorable instance.
- [ReadStorableFromFile](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/readstorablefromfile.md): (2 overloads, static) Read an IStorable object from a file.
- [ReadStorableFromStream](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/readstorablefromstream.md): (4 overloads, static) Read an IStorable object from a binary reader.
- [RegisterRestorableType](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/registerrestorabletype.md): (2 overloads, static) Add a type to the known set of restorable types. Consider using the overload which only takes a single type parameter to ensure your registration is correct.
- [ResolveType](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/resolvetype.md): (static) Try and get the type associated with a particular identifier.
- [TryGetIoId](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/trygetioid.md): (static) Gets the value of the IoId attribute associated with a type.
- [ValidateIStorable](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/validateistorable.md): (2 overloads, static) Validate the design of a type which implements the IStorable interface.
- [WriteNodeToByteArray](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/writenodetobytearray.md): (static) Serialize a node directly to a byte array.
- [WriteNodeToFile](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/writenodetofile.md): (static) Write a node to a file.
- [WriteNodeToStream](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/writenodetostream.md): (2 overloads, static) Append a node to a stream using a binary writer.
- [WriteStorableToByteArray](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/writestorabletobytearray.md): (static) Serialise an IStorable instance to a byte array.
- [WriteStorableToFile](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/writestorabletofile.md): (static) Write a storable object to a file.
- [WriteStorableToStream](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/writestorabletostream.md): (2 overloads, static) Append a storable object to a stream.

## Events

- [LinkType](https://developer.rhino3d.com/api/gh2/type/grasshopperio.io/linktype.md): (static) This event is raised whenever a specific type implementation is required during deserialisation. Normally, all deserialisable types will have been registered with GrasshopperIO.IO ahead of time, but it is possible some types were omitted from standard registration due to their non-publicness, or maybe because they need to be loaded on demand.
