C# Querying With LINQ Functional Programming in C# Delegates

Jason Rice
Jason Rice
6,586 Points

this should work...

compiler error, doesn't like the parenthesis...

Program.cs
using System;

namespace Treehouse.CodeChallenges
{
    class Program
    {

        delegate MathOperation(int number);

        static void Main(string[] args)
        {

        }
    }
}

1 Answer

andren
MOD
andren
Treehouse Moderator 28,186 Points

You have forgotten to specify the return type of the delegate.

If you add int as a return type like this:

delegate int MathOperation(int number);

Then your code will work.

Jason Rice
Jason Rice
6,586 Points

That worked!! Thanks for your help!