开发者

Share XML documentation across overloads

Is there a way to share XML documentation of the parameters to all the overloads? Let's say I have 10 overloads of a method but they all share the first 5 parameters (I use C# so I cannot have optional parameters).

How do I d开发者_运维问答o it so that I do not have to write the same text for all of the parameters?


This doesn't really answer your question, but I find that when I get more than 5-8 overloads, it is simpler to provide a simple POCO with every possible argument.

This gives me a place to embed validation and add as many properties as I like at a later date, and it's a single place to add xml docs.


You can't. The task could be automated but the same text will have to be there for the compiler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜