Best practices: C# Extension methods namespace and promoting extension methods

后端 未结 10 1022
南方客
南方客 2021-02-02 06:43

I know there exists already a post, describing nearly the same, but I think mine is a bit different.

What I would like to know is how you organize your extension methods

10条回答
  •  南方客
    南方客 (楼主)
    2021-02-02 07:18

    Presuming you use Visual Studio, one way would be to create a custom Class template (or modify the default one) so that whenever a developer creates a new class file it automatically has a using statement with your namespace(s). See Customize Visual Studio 2005 Templates for Coding Productivity.

提交回复
热议问题