Author: martin
Date: 2006-11-28 09:34:43 -0500 (Tue, 28 Nov 2006)
New Revision: 68585
Added:
branches/martin/anonymous-methods2/work/test-martin-9.cs
Log:
New test.
Added: branches/martin/anonymous-methods2/work/test-martin-9.cs
===================================================================
--- branches/martin/anonymous-methods2/work/test-martin-9.cs 2006-11-28
14:27:07 UTC (rev 68584)
+++ branches/martin/anonymous-methods2/work/test-martin-9.cs 2006-11-28
14:34:43 UTC (rev 68585)
@@ -0,0 +1,26 @@
+using System;
+using System.Collections;
+
+class X {
+ delegate int A ();
+
+ static IEnumerator GetIt (int [] args)
+ {
+ foreach (int arg in args) {
+ Console.WriteLine ("OUT: {0}", arg);
+ A a = delegate {
+ Console.WriteLine ("arg: {0}", arg);
+ Console.WriteLine ("args: {0}", args);
+ return arg;
+ };
+ yield return a ();
+ }
+ }
+
+ static int Main ()
+ {
+ IEnumerator enumerator = GetIt (new int [] { 4, 8, 9});
+ enumerator.MoveNext ();
+ return 0;
+ }
+}
Property changes on: branches/martin/anonymous-methods2/work/test-martin-9.cs
___________________________________________________________________
Name: svn:executable
+ *
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches