大家看:
namespace AsterDnet
{
    using System;
    ...........
这样也可以啊?using不是要写在所有代码之前吗?

解决方案 »

  1.   

    可以,using只要是写在类名之前就可以
      

  2.   

    你要是想写在命名空间内的话,得这样写
    using (System.Windows.Forms.Label  lb=new Label ())
      

  3.   

    当然可以,using 有两个作用,一是引用类库,二是象楼上那样用,using内的代码执行完以后释放资源。
      

  4.   

    去看看1.0的代码, 全写在namespace 里namespace x
    {
    using System.WinForms;
    }
      

  5.   

    using alias = type|namespace;
    照抄一下msdn:))
      

  6.   

    byhum和zhaodayong 是都是lz吧?
    http://community.csdn.net/Expert/topic/4819/4819731.xml?temp=.4761621
    http://community.csdn.net/Expert/topic/4814/4814920.xml?temp=2.474612E-02
    http://community.csdn.net/Expert/topic/4814/4814915.xml?temp=.6950342