Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.