Skip to main content

Explain the different kinds of delegates and how they are represented internally.

Expert C#
Quick Answer A delegate internally stores a method pointer and a target object. Static method delegates have no target. When you capture variables in a lambda, the compiler generates a hidden closure class to hold them. Multicast delegates maintain an invocation list array รขโ‚ฌโ€ invoking iterates and calls each entry.

Answer

Delegates can be:

  • Open/closed static
  • Open/closed instance
  • Multicast (invocation list)

Captured variables create hidden closure classes.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice