Why can't i use partly qualified namespaces during object initialization?

前端 未结 4 1804
不知归路
不知归路 2020-12-28 20:59

I suspect this is a question which has been asked many times before but i haven\'t found one.

I normally use fully qualified namespaces if i don\'t use that type of

4条回答
  •  难免孤独
    2020-12-28 21:17

    This obvious way unfortunately not working but you can make all this by an alias namespace:

    using ns_1_1 = ns_1.ns_1_1;
    
    public class Program
    {
        public Program()
        {
            var no_foo = new ns_1_1.Foo();
        }
    }
    

提交回复
热议问题