Reflection — RexDac Academy

RexDac AcademyTechnical notes · Some prior knowledge helps
0%Published notes read · this device

Level 7 — Metadata

Reflection

Original notes by SunDiaL · View English source

Reflection is the ability of a program to inspect itself while running. It lets you look at:

Type type = typeof(MyClass);
var methods = type.GetMethods();
var attrs = type.GetCustomAttributes(false);

In short: Reflection is how you read the metadata — Attributes are just one kind of metadata.