Re: Newbie Question: Commented Code

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Lasse Vågsæther Karlsen (lasse_at_vkarlsen.no)
Date: 03/02/05


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


Relevant Pages

  • Re: Alternatives to using gsoap
    ... I had hoped to use the mod_gsoap product to read an XML file, ... database search on the server side, ... The documentation and coding associated with mod_gsoap do not work as ... >> It is my understanding that gsoap can be used to process applications ...
    (comp.os.linux.development.apps)
  • RE: column not being hidden
    ... but only in the XML file. ... Here's quote from VS documentation ... "The ColumnMapping property determines how a DataColumn is mapped when a ... Microsoft CDO for Windows 2000 ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Alternatives to using gsoap
    ... > I had hoped to use the mod_gsoap product to read an XML file, ... > database search on the server side, ... > same functionality - but have better documentation, samples, etc. ... Just from the little bit in this thread; try rebuilding gsoap with debug on ...
    (comp.os.linux.development.apps)
  • Re: PHPDocumentor for ASP.NET
    ... thru a third-party control. ... I love and use nDoc for my documentation; ... To get the comments compiled into an XML file, that site may have info on ... then nDoc can create nice-looking manuals with the style you want. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Different Approaches to Saving settings: Which is better?
    ... Everything that affects the computer and belongs to that Registry, ... Everything that belongs to the application would in my opinion be set in the ... I need to have the properties of these windows to stay when the ... up so that it reads and writes from an xml file to handle all this. ...
    (microsoft.public.dotnet.languages.vb)