a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
48 lines
483 B
C#
48 lines
483 B
C#
using System;
|
|
|
|
public class MyClass
|
|
{
|
|
Func<int> ll;
|
|
|
|
int Test (int a)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
public void Run ()
|
|
{
|
|
Action<int> a = l => {
|
|
ll = () => l;
|
|
};
|
|
|
|
a (1);
|
|
|
|
Action<int> a2 = l => {
|
|
ll = () => l;
|
|
};
|
|
|
|
a2 (2);
|
|
}
|
|
|
|
public void Run2 ()
|
|
{
|
|
Action<int> a = l => {
|
|
ll = () => Test (l);
|
|
};
|
|
|
|
a (1);
|
|
|
|
Action<int> a2 = l => {
|
|
ll = () => Test (l);
|
|
};
|
|
|
|
a2 (1);
|
|
}
|
|
|
|
public static void Main ()
|
|
{
|
|
var mc = new MyClass ();
|
|
mc.Run ();
|
|
mc.Run2 ();
|
|
}
|
|
} |