# Garden class

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

```cs
public static class Garden
```

A utility class for building various kinds of trees and twigs.

## Fields

- [LeafSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/leafsymbol.md): (static) The unicode emoji for [Leaf<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.leaf-1.md)
- [MetaSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/metasymbol.md): (static) The unicode emoji for [MetaData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadata.md)
- [PearSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/pearsymbol.md): (static) The unicode emoji for [IPear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.ipear.md).
- [TreeSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/treesymbol.md): (static) The unicode emoji for [ITree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.itree.md).
- [TwigSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/twigsymbol.md): (static) The unicode emoji for [ITwig](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.itwig.md).

## Methods

- [ApplyExpression](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/applyexpression.md): (static) Apply an expression to an entire tree.
- [ConcatenateITwigs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/concatenateitwigs.md): (static) Concatenate an arbitrary number of twigs into a single twig in a single pass, avoiding the quadratic allocation cost of repeated pairwise merging.
- [IPear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/ipear.md): (static) Create a pear for a value with optional meta data.
- [ITreeEmpty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itreeempty.md): (static) Gets a non-constraint empty tree.
- [ITreeFromArrays](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itreefromarrays.md): (2 overloads, static) Create a tree from a nested array of values, with optional meta data and null flags.
- [ITreeFromILeaves](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itreefromileaves.md): (static) Recreate a tree from a collection of leaves.
- [ITreeFromIPears](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itreefromipears.md): (2 overloads, static) Create a tree with a single twig using a default path.
- [ITreeFromITwigs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itreefromitwigs.md): (2 overloads, static) Create a tree from a collection of twigs.
- [ITreeFromList](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itreefromlist.md): (static) Create a tree with a single twig using a default path.
- [ITwigEmpty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itwigempty.md): (static) Gets a non-constraint empty twig.
- [ITwigFromList](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itwigfromlist.md): (static) Create a twig based on a collection of values.
- [ITwigFromOneValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itwigfromonevalue.md): (static) Create a twig based on a single value. If the value provided implements IPear, it will be handled accordingly.
- [ITwigFromPears](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itwigfrompears.md): (static) Create a twig from a collection of pears.
- [ITwigNulls](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/itwignulls.md): (static) Create a twig of the given type containing the given amount of nulls.
- [MergeITrees](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/mergeitrees.md): (static) Merge two or more trees of potentially different types.
- [MergeTrees<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/mergetrees.md): (static) Merge two or more trees of the same type.
- [MergeTwigs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/mergetwigs.md): (2 overloads, static) Merge a set of twigs into one.
- [PairWiseOp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/pairwiseop.md): (2 overloads, static) Perform a regular (i.e. 'longest list') operation on all value pairs in two trees. This method returns the most constrained type of [Tree<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.tree-1.md), regardless of the specific type on which this method was invoked.
- [Pear<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/pear.md): (static) Create a pear for a value with optional meta data.
- [PearComparison](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/pearcomparison.md): (static) Test two pears for equality.
- [PearEquality](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/pearequality.md): (static) Test two pears for equality.
- [PearWiseOp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/pearwiseop.md): (2 overloads, static) Create a new tree by performing an operation on all the pairs on another tree.
- [ReadITree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/readitree.md): (static) Deserialise a tree.
- [ReadITwig](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/readitwig.md): (static) Deserialise a twig.
- [ReadPear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/readpear.md): (2 overloads, static) Deserialise a pear.
- [ReadTree<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/readtree.md): (static) Deserialise a tree.
- [ReadTwig<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/readtwig.md): (static) Deserialise a twig.
- [RemoveMeta](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/removemeta.md): (2 overloads, static) Remove all occurences of a collection of meta names from a tree.
- [TreeEmpty<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/treeempty.md): (static) Gets the empty tree for a specific type constraint.
- [TreeFromArrays<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/treefromarrays.md): (2 overloads, static) Create a tree from a nested array of values, with optional meta data and null flags.
- [TreeFromLeaves<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/treefromleaves.md): (static) Recreate a tree from a collection of leaves.
- [TreeFromList<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/treefromlist.md): (2 overloads, static) Create a tree with a single twig using a default path.
- [TreeFromPears<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/treefrompears.md): (2 overloads, static) Createa tree with a single twig using a default path.
- [TreeFromTwigs<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/treefromtwigs.md): (2 overloads, static) Create a tree from a collection of twigs.
- [TreeFromUnchecked<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/treefromunchecked.md): (static) Create a tree from unchecked paths and twigs. Paths need not be sorted or unique. Twigs associated with identical paths will be merged.
- [TryCast<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/trycast.md): (2 overloads, static) Attempt to cast an array of vague providence to a specific type. This will only work if the source array *is* of the correct type, or if all its elements are compatible with the target type.
- [TryCreateDeepCopy](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/trycreatedeepcopy.md): (static) Attempt to create a copy of a tree by duplicating all the values. Values which are value types or otherwise known to be immutable will not be copied. Copying to mutable reference types will occur via type assistants. There is no guarantee that duplication was successful in all cases.
- [TwigEmpty<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/twigempty.md): (static) Gets the empty twig for a specific type constraint.
- [TwigFromList<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/twigfromlist.md): (static) Create a twig based on a collection of values.
- [TwigFromOneValue<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/twigfromonevalue.md): (2 overloads, static) Create a twig based on a single value.
- [TwigFromPears<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/twigfrompears.md): (static) Create a twig from a collection of pears.
- [TwigFromValues<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/twigfromvalues.md): (static) Create a twig based on a collection of values. No meta data or nulls can be set.
- [TwigNulls<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/twignulls.md): (static) Create a twig which contains only null values.
- [WriteITree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/writeitree.md): (static) Serialise an ITree.
- [WriteITwig](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/writeitwig.md): (static) Serialise a twig.
- [WritePear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/writepear.md): (static) Serialise a pear.
- [WriteTree<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/writetree.md): (static) Serialise a Tree.
- [WriteTwig<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.garden/writetwig.md): (static) Serialise a twig.
