bring Mono Security to monotouch
[mcs.git] / tests / gtest-iter-08.cs
blob3f1712e36a4117c93e8322b71c090dcfdd8d1f46
1 using System;
2 using System.Collections;
4 class App
6 public static int Main ()
8 foreach (object o in QueryEnumerable<string>()) {
9 if ((string)o != "Type: System.String")
10 return 1;
13 if (TestType<string>().GetType () != typeof (string))
14 return 2;
16 return 0;
19 public static IEnumerable QueryEnumerable<T> ()
21 yield return "Type: " + typeof(T);
24 public static T TestType<T> ()
26 return (T) TestType (typeof(T));
29 public static object TestType (Type t)
31 return "1";