博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C#基础
阅读量:4305 次
发布时间:2019-06-06

本文共 613 字,大约阅读时间需要 2 分钟。

函数重载

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace exam{    class Program    {        ///         /// 函数重载        /// 函数名相同,参数类型或者参数个数不同        ///         ///         static void Main(string[] args)        {            Sayhello("Tom");            Sayhello(20);            Console.ReadKey();        }        static void Sayhello(string name)        {            Console.WriteLine("hello,{0}",name);        }        static void Sayhello(int age)        {            Console.WriteLine("u age is{0}", age);        }    }}

 

转载于:https://www.cnblogs.com/tangt/p/4143322.html

你可能感兴趣的文章
VC编程心得
查看>>
mysql那些事(6) WHERE条件 字符串的引号
查看>>
微信支付配置参数:支付授权目录、回调支付URL
查看>>
Redis(四):Spring + JedisCluster操作Redis(集群)
查看>>
百度正式发布PaddlePaddle深度强化学习框架PARL
查看>>
[转]Installing Memcached on Windows
查看>>
JMeter测试组件
查看>>
测试用例设计方法
查看>>
直接从chrome中复制的body到postman中希望能自动识别去除空格
查看>>
走过小公司的坑之入职一周
查看>>
[ZJOI2007]棋盘制作 悬线法dp 求限制下的最大子矩阵
查看>>
洛谷P1073 Tarjan + 拓扑排序 // 构造分层图
查看>>
为什么需要做归一化或者标准化
查看>>
UVa 11324 最大团(强连通分量缩点)
查看>>
Codeforces Round #441 D. Sorting the Coins(模拟)
查看>>
BZOJ 4808: 马(二分图最大点独立集)
查看>>
dateframe行列插入和删除操作
查看>>
spring的父子容器
查看>>
Rapidmind计算库性能测试
查看>>
POJ 1308 Is It A Tree? (并查集)
查看>>