合理化命名类
加上命名空间(LS说了)
有没有办法就是只能调用us里的方法而不能直接调用user_WebService里的方法呢?
---------------------------------------------------------------
user_WebService 做成接口,继承后实现,静态的方法也可以

解决方案 »

  1.   

    把WebService的引用独立出来 比如叫AccountServiceLayer
    做个类,如下
    namespace Company.Product.WebServices;
    在这个类里面静态实现WebService相关方法在User类
    加上
    using Company.Product.WebServices
    来调用刚才的类namespace Company.Product.Account
    {
        public class User()
        {
            AccountServiceLayer.Method(); // 某方法
        }
    }网页里
    using Company.Product.Account;namespace Company.Product.Web
    {
        public class YourPage : Page
        {
            ...
        }
    }这样us.user_WebService是取不到的
    因为user_WebService全名是Company.Product.WebServices.AccountServiceLayer.user_WebService
    而User所在是Company.Product.Account