News for hackers. Stuff that matters.
Re:The search for easier safe systems programming by dartos on Friday May 10, 2024 @08:27AM (#40318158)
Delegate is a C# term and was what I was talking about

https://learn.microsoft.com/en-us/dotnet/csharp/programming-...

I need to create a delegate for any function I want to pass around.

Re:The search for easier safe systems programming by neonsunset on Friday May 10, 2024 @09:04AM (#40318505)
Trolling is bad, consider asking ChatGPT or reading documentation first, thanks.

    var func1 = (int i) => i + i;
    var func2 = () => func1(1) * 2;
    
    Console.WriteLine(func1(4) + func2());