名空间使用问题
本人初学C#,正在看C#入门经典这书,有道名空间的习题解决不了,查了MSDN也查不出有关这题的资料.题目如下:
- C# code
namespace fabulous{ //code in fabulous namespace}namespace super{namespace smash{//great name defined}}
如何引用名空间fabulous中的名称great?原题描述如下,下面是我写的代码,编译通不过,因为是刚开始学C#,很多东西都不了解,还请大家指点一下,谢谢先^^
- C# code
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _3._5._1{ class Program { static void Main(string[] args) { namespace fabulous { using s1 = super.smashing; Console.WriteLine("{0}",s1.great); } namespace super { namespace smashing { int great = 10; } } } }}
[解决办法]