Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / gtest-iter-08.cs
1 using System;
2 using System.Collections;
3
4 class App
5 {
6         public static int Main ()
7         {
8                 foreach (object o in QueryEnumerable<string>()) {
9                         if ((string)o != "Type: System.String")
10                                 return 1;
11                 }
12                 
13                 if (TestType<string>().GetType () != typeof (string))
14                         return 2;
15                 
16                 return 0;
17         }
18         
19     public static IEnumerable QueryEnumerable<T> ()
20     {
21                 yield return "Type: " + typeof(T);
22     }
23     
24         public static T TestType<T> ()
25         {
26                 return (T) TestType (typeof(T));
27         }
28
29         public static object TestType (Type t)
30         {
31                 return "1";
32         }    
33 }