Junior · Explain · Open definitions and constructed generic types

What is the difference between a generic definition and a constructed Type, and why is an open definition not a ready-to-create object?

Think through your answer before opening the explanation.

Runtime & concurrency

Reveal answer and reasoning

A generic definition describes a reusable declaration whose parameters have not all been assigned concrete type arguments. A constructed Type binds arguments into those positions, as Dictionary of string and integer does. The closed construction can report its definition and arguments, but the unbound Dictionary definition still contains generic parameters. Being generic is therefore not the same as being a closed, concrete, instantiable type.

The lesson inspects a known construction rather than synthesizing arbitrary code. A common wrong answer treats an open definition as a wildcard assignability target or assumes every IsGenericType result can be passed directly to activation. Runtime construction additionally checks argument count and constraints, while trimming and NativeAOT can impose reachability requirements for code and metadata. Keep declaration identity, selected arguments, valid construction, and deployment availability separate instead of inferring them from a displayed type name.

What a strong answer covers

  • A definition retains unbound parameters.
  • Constructed types bind positional arguments.
  • Activation and deployment require more than IsGenericType.

Common pitfall

Treating an open generic definition as an instantiable wildcard type.

Follow-up questions

  1. Can a constructed reflected type still contain generic parameters?
  2. What additional validation does MakeGenericType perform?

Self-review

Choose what to revisit. These marks are your own assessment and are separate from lesson completion.

Primary references

Open lesson and code ↗

← All interview questions