What is a method group in C#?
Codemia Knowledge Hub ·
A method group in C# is the name of a method referenced without parentheses. Writing Console.WriteLine instead of Console.WriteLine("hello") refers to the method group: the whole set of overloads that share that name. The compiler uses the surrounding context (a delegate type, a lambda target, or a LINQ method parameter) to pick the specific overload.
Method groups sit behind delegates, event subscriptions and LINQ, and knowing what they are explains a whole family of compiler errors.
A method group is not a value on its own
You cannot store a method group in a variable directly. It is an expression the compiler resolves to one specific method once it has enough context, and that context is almost always a delegate signature.
Consider a class with overloads:
MathOps.Add is a method group with three overloads. Assigning it to var fails because the compiler cannot tell which overload you mean, but assigning it to a delegate type works:
Method group conversion
Method group conversion is the implicit step in which the compiler turns a method group into a delegate. It follows normal overload resolution, except the "arguments" are the delegate's parameter types rather than actual values.
The conversion fails at compile time if no overload matches the delegate signature, or if more than one matches ambiguously. It checks the return type as well as the parameters: Func<int> will not accept a void method even if the parameters match.
Method groups vs. lambda expressions
Before C# 2.0 added anonymous methods and C# 3.0 added lambdas, method groups were the main way to create delegate instances. Today both styles are common:
Both behave the same. The method group form is shorter and can avoid an extra allocation: the compiler can sometimes cache a delegate created from a method group, while a lambda that captures variables always allocates.
| Scenario | Recommended | Reason |
| Event subscription to an existing method | Method group | Shorter, no wrapper delegate |
| Inline logic with no existing method | Lambda | No need to define a named method |
| LINQ projection with a simple static method | Method group | list.Select(int.Parse) reads cleanly |
| Logic that captures local variables | Lambda | Method groups cannot capture locals |
| Unsubscribing from events | Method group | Same method reference enables -= removal |
Method groups on instance methods do capture this, but they cannot capture local variables. If you need a closure, use a lambda.
Method groups in LINQ
Method groups read well in LINQ when an existing static method already does the job:
The two lines are equivalent; the method group version signals that nothing happens beyond int.Parse.
Method groups only fit when the method signature matches the delegate parameter exactly. If you need to negate, transform or add arguments, you need a lambda:
Subscribing and unsubscribing events
Event subscription is one of the most common uses:
Using the method group for both += and -= means the delegates match, so unsubscribing works. Subscribing with event += (s, e) => Handle(s, e) and later writing event -= (s, e) => Handle(s, e) does not remove anything, because the two lambdas are different delegate instances. Use a method group or keep the delegate in a field.
The "Cannot convert method group to non-delegate type" error
This error appears when you write a method name without parentheses where a value is expected:
You referenced the method group when you meant to call the method, and the fix is almost always adding (). The term "method group" in the message is what confuses people who have not met it before.
The reverse mistake is adding parentheses where a method group is expected:
When several overloads could match a delegate type, the compiler reports an ambiguity error. Resolve it with a cast or a lambda that selects the overload explicitly.
Natural type for method groups (C# 10+)
Since C# 10, a method group can have a "natural type", so the compiler can infer a delegate type for var without you naming one. This only works when the group has a single candidate method. A method with one overload, such as Console.Read, gets a natural type. Console.WriteLine has many overloads, so it gets none and the second line below does not compile.
Before natural types, any such assignment failed with "cannot assign method group to implicitly typed variable."
Method groups, delegates and lambdas side by side
| Concept | What It Is | Example |
| Method group | A reference to one or more overloads by name | Console.WriteLine |
| Delegate | A type-safe function pointer type | Action<string>, Func<int, bool> |
| Delegate instance | An object pointing to a specific method | new Action<string>(Console.WriteLine) |
| Lambda expression | An anonymous function defined inline | x => x > 0 |
| Method group conversion | Implicit conversion from method group to delegate | Action<string> a = Console.WriteLine; |
Related reading
- What is a .NET application domain?
- What is a NullReferenceException, and how do I fix it?
- What is a Portable Class Library?
- What is a Predicate Delegate and where should it be used?
- What is a predicate in c?
- What is a proper implementation of the IAsyncResult interface?
- What is a quick way to force CRLF in C / .NET?
- What is a replacement method for Task.Run in .NET 4.0 using C?

OOD Fundamentals
Master object-oriented design from first principles, SOLID, design patterns, and classic interview problems with hands-on coding.
View the courseData Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.