Use the GetType Method to Get a Class Name as a String is invoked on an instance of an object. The operator fetches a class, representing a type at compile time. We can then use the operator from within a static class to retrieve the class name. Like the operator, the operator can also be used inside a staticclass.
•6m read time• From code-maze.com
Table of contents
Use the GetType Method to Get a Class Name as a StringUse the typeof OperatorUse the nameof Operator t o Get a Class Name as a StringUse ReflectionConclusionSort: