• 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
        {
    
        }
    
        
    }

     

  • 相关阅读:
    053-146
    053-659
    053-658
    053-657
    053-656
    053-654
    053-655
    053-652
    053-651
    053-650
  • 原文地址:https://www.cnblogs.com/ZHANG576433951/p/11127490.html
Copyright © 2020-2023  润新知