Get text in c#, from rhino to grasshopper

Hi I’m trying to replicate the following (working) python script in c# but I don’t get how to access the text and the plane:

import rhinoscriptsyntax as rs
import Rhino as rc
import scriptcontext as sc

sc.doc = rc.RhinoDoc.ActiveDoc

if id_gui:
tObj = rs.coercerhinoobject(id_gui)
text = tObj.DisplayText
plane = tObj.Geometry.Plane

sc.doc = ghdoc