This documentation is archived and is not being maintained.

Compiler Error CS1953

Visual Studio 2008

An expression tree lambda may not contain a method group.

A method call requires the () operator. The method name without that operator refers to the method group, which is the set of all the overloaded methods with that name.

To correct this error

  • If you meant to call the method, add the () operator.

The following example generates CS1953:

// cs1953.cs
using System;
using System.Linq.Expressions;
class CS1953
{
    public static void Main()
    {
        double num = 10;
        Expression<Func<bool>> testExpr =
              () => num.GetType is int; // CS1953 
    }
}
Show: