C# namespaces in web.config

前端 未结 2 1574
旧时难觅i
旧时难觅i 2021-01-18 18:36

Coming from a VB background and being forced to learn C# I have hit the first hurdle.

In VB i could put all the namespaces I wanted available across the entire app

相关标签:
2条回答
  • 2021-01-18 18:47

    For C#, the namespaces entered in the web.config will be recognized in .aspx files, but not codebehind. I don't think it will take you long to adjust (Ctrl-. will let you quickly add a namespace when you type a class name that doesn't have the namespace referenced).

    0 讨论(0)
  • 2021-01-18 18:47

    This ability is only for VB.NET, the C# project does not support it :/. But, you can create a template for new source code file ( C# Wizard Templates in Visual Studio .NET , How To: Edit Visual Studio Templates ) and change default namespaces as you wish.

    0 讨论(0)
提交回复
热议问题