不允许在另一个嵌套的名称空间中声明多部分的名称空间 如题,我在C#书中看到的一句话,谁能帮我解释下。怎么都看不明白,谁能给个举个例子;最好可以把错误 也一起发出来,一定要在机子上调试啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我也看到这句话 using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace test1{ namespace test1 { namespace test2 { namespace test3 { namespace test4 { } namespace test5 { class tt { public void speak() { Console.WriteLine("11"); } } namespace test7.test8.test9 { class test { public static void speak() { Console.WriteLine("11"); } } } } namespace test6 { class Program { static void Main(string[] args) { test1.test2.test3.test5.test7.test8.test9.test.speak(); } } } } } }}但是我这样嵌套一点问题都没有 ,不知道是怎么回事 名称空间是.NET中提供应用程序代码容器的方式,这样可以惟一标识代码及其内容。名称空间也可以用做.NET Framework 中给项分类的一种方式,而大多数项都是类型定义的。默认情况下,代码包含在全局名称空间中。这意味着对于包含在这段代码中的项,只要按照名称进行引用,就可以由全局名称空间中的其他代码访问它。 sql操作 网页问题 winform 中下载exe文件报错 SerialPort接收短信数据的奇怪问题,请用过的进来看看 NET程序目标在服务器上,运行怪事一桩 如何主动的调用事件函数 怎么把windows控件加到web上 上海今天举行反日游行,我感动的哭了! 海量抓取 将一个中文字符串转换为byte类型的数组,然后再转回为中文字符串? datagridview中的checkbox问题 关于Excel文件打开的问题-乱码
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace test1
{
namespace test1
{
namespace test2
{
namespace test3
{
namespace test4
{
}
namespace test5
{
class tt
{
public void speak()
{
Console.WriteLine("11");
}
}
namespace test7.test8.test9
{
class test
{
public static void speak()
{
Console.WriteLine("11");
}
}
}
}
namespace test6
{
class Program
{
static void Main(string[] args)
{
test1.test2.test3.test5.test7.test8.test9.test.speak();
}
}
}
}
}
}
}
但是我这样嵌套一点问题都没有 ,不知道是怎么回事