使用别名

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_33950757/article/details/102756066
using System;
using System.IO;
using System.Text;
using static System.Console;
using  System.Threading;

//目的 消除两个同名类型的歧义和缩写名称
using CountDownTimer=System.Timers.Timer;

namespace 方法和参数
{
    class Program
    {
        static void Main(string[] args)
        {
            CountDownTimer timer; //CountDownTimer 是别名 没有歧义
            Timer threadTimer;
            ReadKey();
        }
    }

}

猜你喜欢

转载自blog.csdn.net/weixin_33950757/article/details/102756066
今日推荐