Multiple choice technology web technology

Name the .NET Framework feature that can be used to add a method to pre-compiled classes without using inheritance

  1. Extension methods

  2. Lambda Expression

  3. Anonymous methods

  4. Expression trees

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Extension methods allow adding methods to existing types without inheritance or recompilation. This feature was introduced in C# 3.0 / .NET Framework 3.5. Lambda expressions, anonymous methods, and expression trees are related features but don't extend existing classes directly.