Can csharp classes “inherit” XML documentation, such as java classes?

I am adding comments to some csharp code, and I am using the XML language provided by .net (or something else). I have an interface and some implementing classes. I have one method in the interface and it has a comment. in implementing classes there are no comments on the implementation method.

when this is done in java, javadoc automatically uses the interface comment when creating documentation. however, now when I build my project, I get a warning (translated from Swedish, sorry) "there is no xml comment for the visible type or member bla.blabla.blablabla () (cs1591)". this is just a warning, so not so bad. but!!! this means that the xml file was not output, so I cannot use sandcastle to create a chm document file, which is my real goal here ... googling the encoded error gives nothing :(

Do I really need to copy the method comment to all implementation classes? what I like .... code duplication D: is there no way to get the behavior of java sentences?

+3
source share
4

, XML , GhostDoc . , , .

, ... ( ) , .

+4

. , , - ( ) :

. , / //etc, , - .

. , //etc, , ( <remarks>)

+1

VSdocman XML . , GhostDoc, . Sandcastle, .

+1

, Java, , . ...

, , JonSkeet

0
source

Source: https://habr.com/ru/post/1784501/


All Articles