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)))
    return;
  if ((!DA.GetData(1, count)))
    return;

Here is the list of types.
https://developer.rhino3d.com/api/grasshopper/html/N_Grasshopper_Kernel_Types.htm

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)))
    return;
text.get_Branch(0)[0].Value 
//to get the first item in the first branch.

Now getting this message

Hi Karakus,
try it with :

XFR.get_Branch(0)[0].Value;

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.
Like:

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

Thanks ! It seems that did the trick