C# Querying With LINQ Functional Programming in C# Lambda Expressions

Rohit Gopalan
Rohit Gopalan
78,533 Points

Issues with Lambda Functions in Linq

I am again getting issues with getting the Lambda functions to work in Linq. Communication issues are once again being reported. I was wondering whether it can be resolved.

Program.cs
using System;

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

        public Action<int, Func<int, int>> displayResult = delegate (int result, Func<int, int> function)
        {
            Console.WriteLine(function(result));
        };

        static void Main(string[] args)
        {

        }
    }
}

1 Answer

Carling Kirk
STAFF
Carling Kirk
Treehouse Guest Teacher

Rohit, there was an issue in this code challenge and it has been fixed. The delegates should be capitalized in the code. Thank you for reporting this!