Automatically add namespace when adding new item

前端 未结 4 426
暖寄归人
暖寄归人 2020-12-08 23:55

When adding a new item (class, control, etc) in C# it will automatically add a namespace to the file depending on the location in the project.

Is this also available

4条回答
  •  温柔的废话
    2020-12-09 00:31

    Visual Studio 2012: In the project properties in the application tab there is a field named default namespace. This is automatically added to the files inside the project.

    So when you want to reference something in a different project you can import the namespace that is defined there. So there is basically no need to manipulate any template, I guess.

提交回复
热议问题