首页 > Windows开发 > 详细

【C#学习笔记】函数重载

时间:2017-08-27 15:55:50      阅读:224      评论:0      收藏:0      [点我收藏+]
using System;

namespace ConsoleApplication
{
    class Program
    {
        static void Print(int a, int b)
        {
            Console.Write(a + b);
        }

        static void Print(string a,string b)
        {
            Console.Write(a + b);
        }

        static void Main(string[] args)
        {
            Print(1, 2);
            Console.WriteLine();
            Print("1","2");
            Console.Read();
        }      
    }
}

 

【C#学习笔记】函数重载

原文:http://www.cnblogs.com/tiandsp/p/7440422.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!