© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
7 replies
TahaA

Comments in curried lambda expression

Just a quick question. Do you think the comments I used here are correct? If needed I'll provide the whole code:
    public static Func<double, Func<double, double>> GetPriceCalculator(double taxRate)
    {   
        Func<double /*discount*/, Func<double /*price*/, double/*final price*/>> GetFinalPrice = discount => price => price * (1 - discount) * (1 + taxRate);
        return GetFinalPrice;
    }
    public static Func<double, Func<double, double>> GetPriceCalculator(double taxRate)
    {   
        Func<double /*discount*/, Func<double /*price*/, double/*final price*/>> GetFinalPrice = discount => price => price * (1 - discount) * (1 + taxRate);
        return GetFinalPrice;
    }
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

LINQ Lambda-Expression Diff
C#CC# / help
4y ago
❔ Lambda expressions in C#
C#CC# / help
3y ago
✅ Delegate vs lambda function/expression
C#CC# / help
11mo ago
Lambda expression and arrow function
C#CC# / help
2y ago