Hi I'm learning about using Lambda from a book. After I copied a piece of code from the book to VS2010 I got the error:
Delegate '
System.Func<float>' does not take 1 arguments"
VS2010 marked the error under the left parenthesis at line 3, before "float x". Can you tell me what is wrong?
static void Main(string[] args)
{
Func<float> TheFunction = (float x) =>
{
const float A = -0.0003f;
const float B = -0.0024f;
const float C = 0.02f;
const float D = 0.09f;
const float E = -0.5f;
const float F = 0.3f;
const float G = 3f;
return (((((A * x + B) * x + C) * x + D) * x + E) * x + F) * x + G;
};
Console.Read();
}