The System.Reflection.Assembly class represents assembly definitions, whereas the System.Reflection.AssemblyName class represents assembly references. The former exposes rich functionality, and the latter is just data that helps you get the definition should you want it. That’s exactly the model that we wanted to adopt for System.Type.

The Type will only provide a reference to a Type and does not load all the metadata about the type itself. All the rich information of a Type is now within TypeInfo – given a Type you can get the TypeInfo of that type for accessing the metadata. The advantage of this, is that accessing the Type object does not require loading the necessary assembly – that is needed only when accessing the TypeInfo class. This means the control of whether loading an assembly is needed is now with the developer depending on what she wants to achieve.

The Reflection API also starts using IEnumerable instead of Arrays as the return type for most of the methods for better working set and responsiveness.

Compatibility: The new Reflection API is not a breaking change – using the new model is mandatory for Windows Store Apps, but for code targeting .NET Framework 4.5, you can use both the earlier (.NET 4.0 model) or the new model for Reflection. To achieve this, the .NET Framework types use a slightly different type hierarchy. In case you intend to reuse your reflection code between .NET 4.5 and Windows Store apps, Microsoft recommends that you package that as a Portable Class Library.

InfoQ Weekly Newsletter

Join a community of over 250 K senior developers by signing up for our newsletter. If you are based in the EEA, please contact us so we can provide you with the protections afforded to you under EEA protection laws.

Is your profile up-to-date? Please take a moment to review and update.

Email Address

Note: If updating/changing your email, a validation request will be sent

Company name:

Keep current company name

Update Company name to:

Company role:

Keep current company role

Update company role to:

Company size:

Keep current company Size

Update company size to:

Country/Zone:

Keep current country/zone

Update country/zone to:

State/Province/Region:

Keep current state/province/region

Update state/province/region to:

Subscribe to our newsletter?

Subscribe to our architect newsletter?

Subscribe to our industry email notices?

By subscribing to this email, we may send you content based on your previous topic interests. See our privacy notice for details.

You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.