Import Rhino object Names into Grasshopper C# script

I do need to import the names of the \Rhino objects into Grasshopper and I do found this old C# script but seems that It is not working by copy/paste the code from web into a C# component.

I don’t understand what it is complaining that it is not good.

Object_Name.gh (4.9 KB)

The script I do found here:
How can I reading object names? - Grasshopper (grasshopper3d.com)