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

后端 未结 10 1034
南方客
南方客 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:12

    You can achieve what you want by putting extension methods in the global namespace. That's what I do and they're then available without needing any using statements.

提交回复
热议问题