Busy .NET Developer's Guide to Reflection

ted@tedneward.com | Blog: http://blogs.tedneward.com | Twitter: tedneward | Github: tedneward | LinkedIn: tedneward

Reflection: Overview

Type information at runtime

Reflection

Reflection is about runtime access to type metadata

Reflection

CLR Reflection can also interact with instances

... even through language access barriers

Reflection namespace/library

Where and what makes up CLR Reflection?

Reflection

Reflection API (System.Reflection)

Reflection

Reflection API (System.Reflection)

System.Type

The centerpoint of CLR Reflection

System.Type

System.Type is information about a type

System.Type

Obtaining Type instances

System.Type

System.Type API: Overview

System.Type

System.Type API: Interrogatory

System.Type

System.Type API: Components

Reflection: Assemblies

Assembly (and module) metadata

Reflection: Properties

Metadata about properties in a type

Properties

System.Reflection.PropertyInfo objects

Properties

Obtaining a PropertyInfo

Reflection: Methods

Metadata about methods in a type

Methods

System.Reflection.MethodInfo objects

Methods

Obtaining a MethodInfo

Reflection: Constructors

Metadata about constructors

Constructors

System.Reflection.ConstructorInfo objects

Methods

Obtaining a ConstructorInfo

Reflection: Fields

Metadata about fields in a type

Fields

System.Reflection.FieldInfo objects

Fields

Obtaining a FieldInfo

CLR Custom Attributes

Extending and obtaining standard CLR type information

Runtime Type Creation

Don't just read type information... create it!

Reflection.Emit

Generating types and code at runtime

CodeDOM

Building a tree of type information at runtime

Summary

.NET Reflection is a powerful way to access class metadata at runtime

Credentials

Who is this guy?