**** Merged from MCS ****
[mono-project.git] / mcs / tests / a-capture3.cs
blob6c77565221670439f8f1837ff9793618b886c3a8
1 //
2 // Simple variable capturing
3 //
4 delegate void S ();
5 using System;
7 class X {
8 static void Main ()
10 int a = 1;
11 S b = delegate {
12 a = 2;
14 b ();
15 Console.WriteLine ("Back, got " + a);