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

Rohit Gopalan
Rohit Gopalan
77,567 Points

Issues with Linq Delegate Functions

I am unable to get the code working even though it is correct. Communication issues are being reported. Is it possible to resolve this issue?

Program.cs
using System;

namespace Treehouse.CodeChallenges
{
    public class Program
    {
        static void Main(string[] args)
        {
            Func<int, int> Square = delegate(int number) {
                return number * number;    
            };
        }
    }
}
Jennifer Nordell
Jennifer Nordell
Treehouse Moderator

When I try to run your code in the challenge I get a popup from Treehouse saying that there has been a problem reported and they're investigating it. So they're already aware and working on it :smiley:

1 Answer

Rohit Gopalan
Rohit Gopalan
77,567 Points

I realise that I forgot to include the public keyword before Func<int, int>.