Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2008-09-03 16:00:09 +0400
committerMarek Safar <marek.safar@gmail.com>2008-09-03 16:00:09 +0400
commit28b3861c5716ce16b593d6c370620a807be953ee (patch)
tree3d923359a26fb57ff25e25208c2394b393b2e742 /mcs/tests/gtest-iter-08.cs
parent43a00f5cfb6ec201e94dc54f6b3784aecfa37661 (diff)
New test.
svn path=/trunk/mcs/; revision=112172
Diffstat (limited to 'mcs/tests/gtest-iter-08.cs')
-rwxr-xr-xmcs/tests/gtest-iter-08.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/mcs/tests/gtest-iter-08.cs b/mcs/tests/gtest-iter-08.cs
new file mode 100755
index 00000000000..8b93bfff599
--- /dev/null
+++ b/mcs/tests/gtest-iter-08.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections;
+
+class App
+{
+ public static int Main ()
+ {
+ foreach (object o in QueryEnumerable<string>()) {
+ if ((string)o != "Type: System.String")
+ return 1;
+ }
+
+ return 0;
+ }
+
+ public static IEnumerable QueryEnumerable<T> ()
+ {
+ Console.WriteLine ("Type: " + typeof(T));
+ yield break;
+ }
+}