Beispiel #1
0
 public void Captured()
 {
     var           x      = new object();
     ValueStore    store  = new ValueStore();
     Action        action = () => store.SetValue(x);
     Func <Object> f      = () => store.GetValue();  //Implicitly capture closure: x
 }