摘要:
using System;using System.Collections.Generic;using System.Collections;class a<T>{ public void test<T>(T op1, T op2) { Console.Write("op1:"+op1.GetType()+"\top2:"+op2.GetType()); Console.ReadLine(); }}class b{ public static void Main() { a<string> A = new a<s 阅读全文
posted @ 2012-02-17 00:50
solover
阅读(120)
评论(0)
推荐(0)
摘要:
View Code 1 using System; 2 using System.Collections.Generic; 3 using System.Collections; 4 5 6 class a 7 { 8 public void test<T>(List<T> a,List<T> b)//定义泛型方法,和两个泛型列表类型的参数 9 {10 Console.WriteLine(a);11 Console.WriteLine(b);12 Console.WriteLine();13 Consol... 阅读全文
posted @ 2012-02-17 00:24
solover
阅读(265)
评论(0)
推荐(0)
浙公网安备 33010602011771号