# ArchivableDictionary class

Namespace: [Rhino.Collections](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.collections.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[Serializable]
public class ArchivableDictionary : ICloneable, IDictionary<string, object>, ISerializable
```

Represents a dictionary class that can be attached to objects and can be serialized (saved) at necessity.

See remarks for layout.

**Remarks:** This is the layout of this object:

```none
BEGINCHUNK (TCODE_ANONYMOUS_CHUNK)
|- version (int)
|- entry count (int)
   for entry count entries
   |- BEGINCHUNK (TCODE_ANONYMOUS_CHUNK)
   |- key (string)
   |- entry contents
   |- ENDCHUNK (TCODE_ANONYMOUS_CHUNK)
ENDCHUNK (TCODE_ANONYMOUS_CHUNK)
```

## Constructors

- [ArchivableDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/ctor.md): (5 overloads) Initializes an instance of a dictionary for writing to a 3dm archive.

## Properties

- [ChangeSerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/changeserialnumber.md): Retrieve current change serial number. This is a number that gets increased each time a datum is set or changed.
- [Count](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/count.md): Gets the number of key/value pairs contained in the dictionary.
- [Keys](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/keys.md): Gets all entry names or keys.
- [Name](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/name.md): Gets or sets the name string of this [ArchivableDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary.md).
- [ParentUserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/parentuserdata.md): If this dictionary is part of user-data (or is a UserDictionary), then this is the parent user data. null if this dictionary is not part of user-data
- [ICollection<KeyValuePair<string, object>>.IsReadOnly](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-icollection-system-collections-generic-keyvaluepair-system-string-system-object-isreadonly.md)
- [IDictionary<string, object>.Keys](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-idictionary-system-string-system-object-keys.md)
- [IDictionary<string, object>.Values](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-idictionary-system-string-system-object-values.md)
- [Values](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/values.md): Gets all values in this dictionary.
- [Version](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/version.md): Gets or sets the version of this [ArchivableDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary.md).

## Indexers

- [IDictionary<string, object>.this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-idictionary-system-string-system-object-this.md)
- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/item.md): Gets the value associated with the specified key.

## Methods

- [AddContentsFrom](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/addcontentsfrom.md): Add the contents from the source dictionary.
- [Clear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/clear.md): Removes all keys and values from the dictionary.
- [Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/clone.md): Constructs a deep copy of this object.
- [ContainsKey](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/containskey.md): Determines whether the dictionary contains the specified key.
- [GetBool](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getbool.md): (2 overloads) Get value as Boolean, will return defaultValue unless value was created using Set(string key, Boolean value)
- [GetBytes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getbytes.md): (2 overloads) Get value as byte[], will return defaultValue unless value was created using Set(string key, byte[] value)
- [GetDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getdictionary.md): (2 overloads) Get value as ArchivableDictionary, will return defaultValue unless value was created using Set(string key, ArchivableDictionary value)
- [GetDouble](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getdouble.md): (2 overloads) Get value as double, will only succeed if value was created using Set(string key, double value)
- [GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getenumerator.md): Gets the enumerator of this dictionary.
- [GetEnumValue<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getenumvalue.md): (2 overloads) Get an enum value
- [GetFloat](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getfloat.md): (2 overloads) Get value as float, will return defaultValue unless value was created using Set(string key, float value)
- [GetGuid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getguid.md): (2 overloads) Get value as Guid, will return defaultValue unless value was created using Set(string key, Guid value)
- [Getint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getint.md): Get value as int, will return defaultValue unless value was created using Set(string key, int value)
- [GetInteger](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getinteger.md): (2 overloads) Get value as int, will return defaultValue unless value was created using Set(string key, int value)
- [GetObjectData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getobjectdata.md): Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
- [GetPlane](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getplane.md): (2 overloads) Get value as Plane, will return defaultValue unless value was created using Set(string key, Plane value)
- [GetPoint3d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getpoint3d.md): (2 overloads) Get value as Point3d, will return defaultValue unless value was created using Set(string key, Point3d value)
- [GetPoint3f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getpoint3f.md): (2 overloads) Get value as Point3f, will return defaultValue unless value was created using Set(string key, Point3f value)
- [GetString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getstring.md): (2 overloads) Get value as string, will return defaultValue unless value was created using Set(string key, string value)
- [GetVector3d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/getvector3d.md): (2 overloads) Get value as Vector3d, will return defaultValue unless value was created using Set(string key, Vector3d value)
- [Remove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/remove.md): Removes the value with the specified key from the dictionary.
- [RemoveEnumValue<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/removeenumvalue.md): Remove an enum value from the dictionary.
- [ReplaceContentsWith](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/replacecontentswith.md): Replace the contents of the dictionary with that of the given source dictionary.
- [Set](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/set.md): (48 overloads) Sets another [ArchivableDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary.md) as entry in this dictionary.
- [SetEnumValue<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/setenumvalue.md): (2 overloads) Set an enum value in the dictionary with a custom key.
- [ICollection<KeyValuePair<string, object>>.Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-icollection-system-collections-generic-keyvaluepair-system-string-system-object-add.md)
- [ICollection<KeyValuePair<string, object>>.Contains](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-icollection-system-collections-generic-keyvaluepair-system-string-system-object-contains.md)
- [ICollection<KeyValuePair<string, object>>.CopyTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-icollection-system-collections-generic-keyvaluepair-system-string-system-object-copyto.md)
- [ICollection<KeyValuePair<string, object>>.Remove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-icollection-system-collections-generic-keyvaluepair-system-string-system-object-remove.md)
- [IDictionary<string, object>.Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-generic-idictionary-system-string-system-object-add.md): This is not supported and always throws [NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception).
- [IEnumerable.GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-collections-ienumerable-getenumerator.md): Gets the enumerator of this dictionary.
- [ICloneable.Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/system-icloneable-clone.md)
- [TryGetBool](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetbool.md): Get value as Boolean, will only succeed if value was created using Set(string key, Boolean value)
- [TryGetBytes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetbytes.md): Get value as byte[], will only succeed if value was created using Set(string key, byte[] value)
- [TryGetDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetdictionary.md): Get value as ArchivableDictionary, will only succeed if value was created using Set(string key, ArchivableDictionary value)
- [TryGetDouble](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetdouble.md): Get value as double, will only succeed if value was created using Set(string key, double value)
- [TryGetEnumValue<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetenumvalue.md): Attempt to get an enum value from the dictionary using a custom key.
- [TryGetFloat](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetfloat.md): Get value as float, will only succeed if value was created using Set(string key, float value)
- [TryGetGuid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetguid.md): Get value as Guid, will only succeed if value was created using Set(string key, Guid value)
- [TryGetInteger](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetinteger.md): Get value as int, will only succeed if value was created using Set(string key, int value)
- [TryGetPlane](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetplane.md): Get value as Plane, will only succeed if value was created using Set(string key, Plane value)
- [TryGetPoint3d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetpoint3d.md): Get value as Point3d, will only succeed if value was created using Set(string key, Point3d value)
- [TryGetPoint3f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetpoint3f.md): Get value as Point3f, will only succeed if value was created using Set(string key, Point3f value)
- [TryGetString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetstring.md): Get value as string, will only succeed if value was created using Set(string key, string value)
- [TryGetValue](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetvalue.md): Gets the value associated with the specified key.
- [TryGetVector3d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.archivabledictionary/trygetvector3d.md): Get value as Vector3d, will only succeed if value was created using Set(string key, Vector3d value)
