Difficulty: Easy
Correct Answer: Linker
Explanation:
Introduction / Context:
Attributes are stored as metadata in the compiled assembly. Various parts of the .NET toolchain and runtime can read this metadata for diagnostics, code generation, runtime behavior changes, and framework integration.
Given Data / Assumptions:
Concept / Approach:
The CLR and frameworks (e.g., ASP.NET) commonly use reflection to read attributes at runtime. Compilers and tooling (e.g., Visual Studio analyzers) can interpret attributes at compile-time or design-time to produce warnings, errors, or scaffolding. A traditional “linker” in .NET does not generally inspect attributes to drive behavior in the way the CLR, compilers, or runtimes do.
Step-by-Step Solution:
Verification / Alternative check:
Use reflection (GetCustomAttributes) at runtime to confirm CLR accessibility. Mark members with [Obsolete] and watch the compiler react at compile-time.
Why Other Options Are Wrong:
They all are known to read attributes in their respective phases.
Common Pitfalls:
Assuming attribute processing is only runtime; in .NET it spans compile-time, design-time, and runtime.
Final Answer:
Linker
Discussion & Comments