This documentation is archived and is not being maintained.

Compiler Error CS1732

Visual Studio 2008

Expected parameter.

This error is produced when a lambda expression contains a comma following an input parameter but does not specify the following parameter.

To correct this error

  • Either remove the comma, or add the input parameter that the compiler expects to find after the comma.

The following example produces CS1732:

// cs1732.cs
// compile with: /target:library
class Test
    {
        delegate void D(int x, int y);
        static void Main()
        {
        D d = (x,) => { }; // CS1732
      }
    }
Show: