Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Example
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
}