Visual Studio C# tree access in solver routine

The below shows how to access the list of GH geometry in the solver routine. Is there any example for Tree access with different data types (Integer Data Tree, String Data Tree)

protected override void SolveInstance(Kernel.IGH_DataAccess DA)
  //Declare a new List(Of T) to hold your data.
  //This list must exist and should probably be empty.
  List<IGH_GeometricGoo> geometry = new List<IGH_GeometricGoo>();
  Int32 count = 0;

  //Retrieve the whole list using Da.GetDataList().
  if ((!DA.GetDataList(0, geometry)))
  if ((!DA.GetData(1, count)))

Here is the list of types.

You will want to use GH_Structure<GH_String> as the type or the corresponding type.

GH_Structure<GH_String> text = new GH_Structure<GH_String>();
if ((!DA.GetDataTree(0, text)))
//to get the first item in the first branch.

Now getting this message

Hi Karakus,
try it with :


I tried it

I am not sure, but it looks like you need the left part. Its not a void function, where you can modify the GH_Structure itself.

var myValue = XFR.get_Branch(0)[0].Value;

Thanks ! It seems that did the trick