添加Lesson14

This commit is contained in:
2025-10-20 09:23:46 +08:00
parent be8eb0f422
commit b4d3ced472
5 changed files with 175 additions and 0 deletions
@@ -0,0 +1,19 @@
namespace Lesson14_匿名函数练习
{
class Program
{
static void Main(string[] args)
{
Func<int, int> func = Dosomething(3);
int result = func(2);
Console.WriteLine(result);
}
public static Func<int, int> Dosomething(int value)
{
return delegate (int x)
{
return value * x;
};
}
}
}