Test t = new Test ();
t.Test_1 (t);
t.Test_2<int> (1);
+ t.Test_3<Test> (1);
}
public void Test_1<T> (T t) where T : Test
d ();
}
-}
\ No newline at end of file
+
+ public T Test_3<T> (object o) where T : class
+ {
+ bool b;
+ T t2 = null;
+ D d = delegate () {
+ t2 = o as T;
+ };
+
+ d ();
+ return t2;
+ }
+}