C#命名空间
2021-05-05 09:29
                         标签:ring   static   定义   输出   console   ons   通过   关键字   class    namespace again namespace:命名空间关键字 again命名名称; 接下来看一下明明空间该如何使用: 定义两个明明空间,分别在里边定义一个方法 namespace one namespace two         static void Main(string[] args) //通过命名空间下的类名调用方法;             one.first f = new one.first();         } 最终输出语句: 别光记得吃 吃饱了记得散步   C#命名空间 标签:ring   static   定义   输出   console   ons   通过   关键字   class    原文地址:http://www.cnblogs.com/qixiaolan/p/7683787.html
{
    class first
    {
        public void eat()
        {
            Console.WriteLine("别光记得吃");
        }
    }
}
{
    class twos
    {
        public void run()
        {
            Console.WriteLine("吃饱了记得散步");
        }
    }
}
        {
            two.twos t = new two.twos();
            f.eat();
            t.run();
上一篇:c#如何处理自定义消息
下一篇:Windows 下的开发工具箱