1.在c#文件头写using 语句
2.命名空间的别名例子:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Introduction = Gychan.Test;
namespace test
{
class Program
{
static void Main(string[] args)
{
#region namespace
Introduction::StudyExample test = new Introduction.StudyExample();
Console.WriteLine(test.GetNameSpace());
Console.ReadLine();
#endregion
}
}
}
namespace Gychan.Test
{
class StudyExample
{
public string GetNameSpace()
{
return this.GetType().Namespace;
}
}
}