c#中的命名空间、类

重点注意有无分号

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HELLO;//调用HELLO命名空间

namespace demo
{
    class Program
    {
        Test test = new Test();//调用Test类
        static void Main(string[] args)
        {
            Console.WriteLine("hello,world");
            Console.ReadLine();
        }
    }
}
namespace HELLO//重新定义新的空间
{
    class Test
    {

    }

    
}

 

原文地址:https://www.cnblogs.com/ZHANG576433951/p/11127490.html