简单泛型方法

来源:互联网 发布:进入mysql数据库表命令 编辑:程序博客网 时间:2024/06/07 16:32

 

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            getMethod(345);
            Console.ReadKey();
        }

        static void getMethod<T>(T num1)
        {
            Console.WriteLine(num1);
        }

    }
}

 

0 0