Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Is it possible to do this using external file:

C#
/// <summary>
        /// Set the box header 
        /// </summary>
        [DataMember]
        public bool HasHeader { get; set; }


What I have tried:

I need to do the above using external file.
Posted
Updated 17-Oct-16 9:10am
Comments
Suvendu Shekhar Giri 17-Oct-16 2:44am    
Why you want to do so?
What is the logic through which this will be done?
Member 11579819 17-Oct-16 2:45am    
Need to add XML documentation through external file. This is a requirement directly from the clients so I can't say why they want this.
Suvendu Shekhar Giri 17-Oct-16 2:56am    
That's OK but there should be some logic based on which you will insert the xml comments to the respective method/class etc, isn't it?

I have heard of creating documentation out of xml comments in your code but not sure if the revese is possible.
Member 11579819 17-Oct-16 3:00am    
Creating documentation in code is there already in my project. Now i need to do this using external document. It's like a RND task assigned to me. So I thought to ask this here as in I always got my solution whenever I posted any question. And no logic is given to me. Just I need to do RND and see if it is possible.
Suvendu Shekhar Giri 17-Oct-16 3:05am    
again, can you show the external file, how it looks like if you already have it?

The only real way to add XML comments to your code is to do it manually. There is a helper extension available for Visual Studio, called GhostDoc. It helps ease the pain a little.

Of course, you could write an application to do it for you, but it would take a lot less time manually commenting the code than it would to develop, test, and debug an application.

Of course, this would all be moot if you had just commented as you went instead of putting it off.

Finally, your client wants this because when they hire someone else to maintain your code, they want the code to be reasonably well documented.
 
Share this answer
 
To reiterate what John has stated, the best way is to write your XML comments in code while you write your application code. Next, you can use a documentation generator, like Sandcastle to build multiple different kinds of documentation.

Also, under VS project options: Build->Output->(check) XML Documentation file
This will write an XML documentation file when you Build your code from your comments. The XML can then be used by other tools, such as Sandcastle, to build rich documentation for you client.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900