Created
April 19, 2019 13:01
-
-
Save maacpiash/b889f4abd7f21b13f6cb06ac598c1e6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace DelegateMath | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
PrintResult(Multiply, 5, 12); | |
} | |
delegate double Take2intReturn1int(int a, int b); | |
static double Multiply(int x, int y) => x * y; | |
static void PrintResult(Take2intReturn1int func, int p, int q) | |
=> Console.WriteLine(func(p, q)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment