// Creating a Type Symbol for a class named MyClass TypeSymbol myClassSymbol = new TypeSymbol("MyClass"); // Retrieving the name of the class represented by the Type Symbol string className = myClassSymbol.Name; // Retrieving the namespace of the class represented by the Type Symbol string classNamespace = myClassSymbol.Namespace; // Retrieving a list of the fields in the class represented by the Type Symbol ListIn the above example code, we create a new TypeSymbol object to represent a class named MyClass. We then use the object to retrieve the name and namespace of the class and to get a list of its fields. The package/library that TypeSymbol belongs to is the Roslyn compiler platform package. This package provides APIs for working with code that has been written in C#, and includes a wide range of tools for analyzing and manipulating code.
classFields = myClassSymbol.GetFields();