Compiler Error CS1732
Expected parameter.
This error is produced when a lambda expression contains a comma following an input parameter but does not specify the following parameter.
- Either remove the comma, or add the input parameter that the compiler expects to find after the comma.
The following example produces CS1732:
C#
// cs1732.cs
// compile with: /target:library
class Test
{
delegate void D(int x, int y);
static void Main()
{
D d = (x,) => { }; // CS1732
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: