13.3 Retrieving the Type for an Instance

At the heart of reflection is System.Type , which is an abstract base class that provides access to the metadata of a type.

You can access the Type class for any instance using GetType( ) , which is a method implemented on System.Object . When you call GetType( ) , the method returns a concrete subtype of System.Type , which can reflect over and manipulate the type.



C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net