NAMESPACE


◎ USING NAMESPACE

using System;
using System.Collections.Generic;
using OnlineGame;//第二個Namespace

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            //如果最上面的USING沒有加入CLASS所在的NAMESPACE,以下這行會有ERROR
            City city1 = new City();
            //Some Code...
        }
    }
}

namespace OnlineGame
{
    public class City
    {
        //Some Code...
    }
}

results matching ""

    No results matching ""