Re: Newbie Question: Commented Code
From: Lasse Vågsæther Karlsen (lasse_at_vkarlsen.no)
Date: 03/02/05
- Next message: James: "Re: ModeLess Window in Word Addin: How to in C#"
- Previous message: Steve Teeples: "How to pass a parameter of a derived class"
- In reply to: charliewest: "Newbie Question: Commented Code"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 02 Mar 2005 22:36:48 +0100
charliewest wrote:
> I have quite a bit of commented code and old routines in my classes and
> windows forms. To be sure, all of these extra lines (and there's quite a lot)
> are "ignored" when compiling the executable, and essentially, have no effect
> whatsoever, on the final application correct?
>
> Thanks,
>
The only "commented" part of your source code files which will be
handled by the C# compiler is the xml documentation, which is
"commented" out using triple slashes, ie.
/// <summary>
/// This method is just superb.
/// </summary>
The effect this has is:
1. Inside the project this comment is applied, using the identifier to
which it is applied will give you the documentation as part of code insight
2. if you specify a .xml file for the build process, the documentation
is exported to this xml file, and also checked according to some rules
for consistency with the code it is applied to. This xml file can then
be used by other projects to give the same effect as point 1 across
projects.
Everything else is, AFAIK, ignored completely, and will not have any
impact on your compiled assembly.
-- Lasse Vågsæther Karlsen http://www.vkarlsen.no/ mailto:lasse@vkarlsen.no PGP KeyID: 0x0270466B
- Next message: James: "Re: ModeLess Window in Word Addin: How to in C#"
- Previous message: Steve Teeples: "How to pass a parameter of a derived class"
- In reply to: charliewest: "Newbie Question: Commented Code"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|