Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error CS0748
Collapse the table of content
Expand the table of content

Compiler Error CS0748

Visual Studio 2008

Inconsistent lambda parameter usage; all parameter types must either be explicit or implicit.

If a lambda expression has multiple input parameters, some parameters cannot use implicit typing while others use explicit typing.

To correct this error

  • Give all the input parameters implicit types, or give them all explicit types.

The following code generates CS0748 because, in the lambda expression, only alpha is given an explicit type:

// cs0748.cs
class CS0748
{
    delegate double D(int x, int y);
    D d = (int alpha, beta) => { return beta / alpha; }; // CS0748
}

Community Additions

ADD
Show:
© 2015 Microsoft