C# Querying With LINQ Functional Programming in C# Actions and Funcs

Joshua C
Joshua C
50,802 Points

There was a temporary issue running this code challenge (Task 3 of 3)

I've emailed Help Desk (help@teamtreehouse.com) about this issue and they are getting through this task fine. My response from them was that my code is incorrect; however, when I try it, I don't get any errors in the preview. I get a popup saying:

"Oh no!

There was a temporary issue running this code challenge. We've been notified and will investigate the problem.

If you continue experiencing problems, please contact support at help@teamtreehouse.com."

What's wrong with my code?

Please help (Carling Kirk?)

Thank you.

Program.cs
using System;

namespace Treehouse.CodeChallenges
{
    public class Program
    {
        public Func<int, int> Square = delegate (int number)
        {
            return number * number;
        };

        Action<int, Func<int, int>> DisplayResult = delegate (int result, Func<int, int> operation)
        {
            Console.WriteLine(operation(result));
        };
    }
}

1 Answer

Steven Parker
Steven Parker
171,373 Points

You're going to love this....

:point_right: You left off the "public" before "Action".

You might write the support guys one more time and point this out. I tried this several times, and every time I left off the "public", the challenge crashes!

Joshua C
Joshua C
50,802 Points

Thanks man. I was getting so frustrated! :-) I'll contact support and let them know.