# FieldDictionary class

Namespace: [Rhino.Render.Fields](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.render.fields.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[DebuggerDisplay("{DebuggerDisplay, nq}")]
public sealed class FieldDictionary : IEnumerable
```

Dictionary containing RenderContent data fields. Add fields to this dictionary in your derived RenderContent classes constructor. Get field values using the TryGet[data type]() methods and set them using the Set() method.

**Example:**

[System.Runtime.InteropServices.Guid("ABE4059B-9BD7-451C-91B2-67C2F188860A")] public class CustomMaterial : RenderMaterial { public override string TypeName { get { return "CSharp Custom Material"; } } public override string TypeDescription { get { return "My first custom .NET material"; } } public CustomMaterial() { Fields.AddField("bool", false, "Yes/No"); Fields.AddField("color", Rhino.Display.Color4f.White, "Color"); } }

## Methods

- [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/add.md): (46 overloads) Add a new BoolField to the dictionary.
- [AddFilename](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/addfilename.md): Add a new StringField to the dictionary which will reference a filename. A file watcher will automatically be attached to the referenced file, and the content will be considered changed when the file is changed on disk.
- [AddTextured](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/addtextured.md): (47 overloads) Add a new BoolField to the dictionary. This overload will cause the field to be tagged as "textured" so that the texturing UI will appear in automatic UIs.
- [ContainsField](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/containsfield.md): Call this method to determine if a this FieldsList contains a field with the specified field name.
- [GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/getenumerator.md)
- [GetField](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/getfield.md): Call this method to get the field with the specified name.
- [RemoveField](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/removefield.md)
- [Set](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/set.md): (32 overloads) Set the field value and send the appropriate change notification to the render SDK. Will throw a InvalidOperationException exception if the key name is not valid.
- [SetTag](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/settag.md): (obsolete) Sets an object that contains data to associate with the field. THIS IS NOW OBSOLETE - if you were using this, please email andy@mcneel.com and let me know why.
- [IEnumerable.GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/system-collections-ienumerable-getenumerator.md)
- [TryGetTag](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/trygettag.md): (obsolete) Gets object that contains data associate with a field. THIS IS NOW OBSOLETE - if you were using this, please email andy@mcneel.com and let me know why.
- [TryGetValue](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.fields.fielddictionary/trygetvalue.md): (17 overloads) Find a field with the specified key and get its value if found.
