Global Import/using Aliasing in .NET

前端 未结 2 1342
鱼传尺愫
鱼传尺愫 2020-12-11 02:46

Using import aliasing in one file/class, we can reference class library namespaces by assigning our own custom alias like this:

\' VB
Imports Db = Company.Li         


        
2条回答
  •  失恋的感觉
    2020-12-11 03:47

    In your web.config file for your website - or most likely app.config file for a project (not confirmed)

        
            
                
                
                
                
                
    

    anything that you put in this section should be a valid replacement for the Imports clause on the top of your code behind pages. Worked wonders for me, let me know if it helps you out

提交回复
热议问题