473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Self documenting regions - would be nice...

With regard to XML comments in c#.

I think that #regions should be self-documenting relative to XML
comments or that a <region> tag should be defined and auto-inserted
when you type #region (blah, blah).

Anyone have any suggestions for having regions and their comments show
up in XML comments...

Jun 2 '06 #1
8 1725
Spleenwort,

The problem with that is that no tool would be able to use it. #region
directives are compiled out of the code, they have no effect on the outcome.
Also, compiled code doesn't have a direct relation in terms of position to
the original typed code. Because of this, where would you put the region in
the compiled assembly?

You could try and put something in there, but I don't know how you would
know to do anything with it.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Spleenwort" <ex********@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
With regard to XML comments in c#.

I think that #regions should be self-documenting relative to XML
comments or that a <region> tag should be defined and auto-inserted
when you type #region (blah, blah).

Anyone have any suggestions for having regions and their comments show
up in XML comments...

Jun 2 '06 #2
Per the email conversation we had:

Nickolas,

I guess I would (expectedly) disagree. There shouldn't need to be a
coupling between what makes it into the assembly - it's for
documentation. For that matter, I'd go so far as to say the IDE should
have a simple editor that would allow you to add your own comment tags.
This is about documentation, not compiled code - I want to be able to
organize a documented view of source code that would allow me to
"outline" the comments in XML/HTML in the same way I can outline in
the IDE. I'd say the fact that such user defined comments or a <region>
tag would have no compiled presence or utility is less than relevant
compared to what they add to the documentation...

Joseph
-----Original Message-----
From: Nicholas Paldino [mailto:ni**********@exisconsulting.com]
Sent: Fri 6/2/2006 2:00 PM
To: Joseph E. Healy
Cc:
Subject: RE: Self documenting regions - would be nice...
Joseph,

I understand what you are getting at, but the XML documentation
in
this case would be used by the IDE exclusively (it doesn't make sense
for it
to be used elsewhere, since the regions are compiled out of the code).

The thing is, the VS.NET IDE uses the assembly, along with the
XML
documentation to provide feedback in the IDE. While the XML comments
could
make it into the XML documentation, the ide would not be able to do
anything
with them, since they do not link up with anything in the compiled
assembly.

I would just place regular comments in the code itself, since
that
is the only place where regions are applicable.

- Nick

-----Original Message-----
From: Joseph E. Healy [mailto:jo**********@AvaSys.com]
Sent: Friday, June 02, 2006 4:57 PM
To: Nicholas Paldino
Subject: RE: Self documenting regions - would be nice...

Nicholas,

The issue is, being an organization freak and to allow me to navigate
code
with the outlining key functions, I use regions pretty extensively. I
have
template that essentially looks more or less like this that I use for
my
code and I'd like the region comments to show up in the xml comments...

- Joseph

namespace namespace.foo
{
#region (REFERENCES)
#endregion
#region (CLASSES, PUBLIC)
public class foo
{
#region (CONSTANTS, PRIVATE)
#endregion
#region (MEMBERS, VALUE, PRIVATE)
#endregion
#region (MEMEBERS, REFERENCE, PRIVATE)
#endregion
#region (PROPERTIES, PUBLIC)
#endregion
#region (DELEGATES, PUBLIC)
#endregion
#region (CONSTRUCTORS, PUBLIC)
#endregion
#region (METHODS, PUBLIC)
#endregion
#region (METHODS, HELPER, PRIVATE)
#endregion
#region (METHODS, DELEGATE, PUBLIC)
#endregion
#region (DESTRUCTOR, PUBLIC)
#endregion}
#endregion
#region (CLASSES_BASE, ABSTRACT, PUBLIC)
#endregion
#region (INTERFACES, PUBLIC)
#endregion
}

-----Original Message-----
From: Nicholas Paldino [mailto:ni**********@exisconsulting.com]
Sent: Fri 6/2/2006 1:44 PM
To: ex********@gmail.com
Cc:
Subject: Re: Self documenting regions - would be nice...

Spleenwort,

The problem with that is that no tool would be able to use
it.
#region
directives are compiled out of the code, they have no effect on
the
outcome.

Also, compiled code doesn't have a direct relation in terms of
position to
the original typed code. Because of this, where would you put
the
region in

the compiled assembly?

You could try and put something in there, but I don't know
how
you would

know to do anything with it.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Spleenwort" <ex********@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
With regard to XML comments in c#.

I think that #regions should be self-documenting relative to XML comments or that a <region> tag should be defined and auto-inserted when you type #region (blah, blah).

Anyone have any suggestions for having regions and their comments
show up in XML comments...


Jun 3 '06 #3
Nicholas,

The issue is, being an organization freak and to allow me to navigate
code
with the outlining key functions, I use regions pretty extensively. I
have
template that essentially looks more or less like this that I use for
my
code and I'd like the region comments to show up in the xml comments...

- Joseph

namespace namespace.foo
{
#region (REFERENCES)
#endregion
#region (CLASSES, PUBLIC)
public class foo
{
#region (CONSTANTS, PRIVATE)
#endregion
#region (MEMBERS, VALUE, PRIVATE)
#endregion
#region (MEMEBERS, REFERENCE, PRIVATE)
#endregion
#region (PROPERTIES, PUBLIC)
#endregion
#region (DELEGATES, PUBLIC)
#endregion
#region (CONSTRUCTORS, PUBLIC)
#endregion
#region (METHODS, PUBLIC)
#endregion
#region (METHODS, HELPER, PRIVATE)
#endregion
#region (METHODS, DELEGATE, PUBLIC)
#endregion
#region (DESTRUCTOR, PUBLIC)
#endregion}
#endregion
#region (CLASSES_BASE, ABSTRACT, PUBLIC)
#endregion
#region (INTERFACES, PUBLIC)
#endregion
}

Jun 3 '06 #4
>From Nicholas' email:

Joseph,

I understand what you are getting at, but the XML documentation
in
this case would be used by the IDE exclusively (it doesn't make sense
for it
to be used elsewhere, since the regions are compiled out of the code).

The thing is, the VS.NET IDE uses the assembly, along with the
XML
documentation to provide feedback in the IDE. While the XML comments
could
make it into the XML documentation, the ide would not be able to do
anything
with them, since they do not link up with anything in the compiled
assembly.

I would just place regular comments in the code itself, since
that
is the only place where regions are applicable.

- Nick

Jun 3 '06 #5
Nickolas,

I guess I would (expectedly) disagree. There shouldn't need to be a
coupling between what makes it into the assembly - it's for
documentation. For that matter, I'd go so far as to say the IDE should
have a simple editor that would allow you to add your own comment tags.
This is about documentation, not compiled code - I want to be able to
organize a documented view of source code that would allow me to
"outline" the comments in XML/HTML in the same way I can outline in
the IDE. I'd say the fact that such user defined comments or a <region>
tag would have no compiled presence or utility is less than relevant
compared to what they add to the documentation...

Joseph

Jun 3 '06 #6
Nicholas,

The issue is, being an organization freak and to allow me to navigate
code with the outlining key functions, I use regions pretty
extensively. I have template that essentially looks more or less like
this that I use for my code and I'd like the region comments to show up
in the xml comments...

- Joseph

namespace namespace.foo
{
#region (REFERENCES)
#endregion
#region (CLASSES, PUBLIC)
public class foo
{
#region (CONSTANTS, PRIVATE)
#endregion
#region (MEMBERS, VALUE, PRIVATE)
#endregion
#region (MEMEBERS, REFERENCE, PRIVATE)
#endregion
#region (PROPERTIES, PUBLIC)
#endregion
#region (DELEGATES, PUBLIC)
#endregion
#region (CONSTRUCTORS, PUBLIC)
#endregion
#region (METHODS, PUBLIC)
#endregion
#region (METHODS, HELPER, PRIVATE)
#endregion
#region (METHODS, DELEGATE, PUBLIC)
#endregion
#region (DESTRUCTOR, PUBLIC)
#endregion}
#endregion
#region (CLASSES_BASE, ABSTRACT, PUBLIC)
#endregion
#region (INTERFACES, PUBLIC)
#endregion
}

Jun 3 '06 #7
>From Nicholas' email:

Joseph,

I understand what you are getting at, but the XML documentation in this
case would be used by the IDE exclusively (it doesn't make sense for it
to be used elsewhere, since the regions are compiled out of the code).

The thing is, the VS.NET IDE uses the assembly, along with the XML
documentation to provide feedback in the IDE. While the XML comments
could make it into the XML documentation, the ide would not be able to
do anything with them, since they do not link up with anything in the
compiled assembly.

I would just place regular comments in the code itself, since that is
the only place where regions are applicable.

- Nick

Jun 3 '06 #8
Nickolas,

I guess I would (expectedly) disagree. There shouldn't need to be a
coupling between what makes it into the assembly - it's for
documentation. For that matter, I'd go so far as to say the IDE should
have a simple editor that would allow you to add your own comment tags.
This is about documentation, not compiled code - I want to be able to
organize a documented view of source code that would allow me to
"outline" the comments in XML/HTML in the same way I can outline in
the IDE. I'd say the fact that such user defined comments or a <region>
tag would have no compiled presence or utility is less than relevant
compared to what they add to the documentation...

Joseph

Jun 3 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Wow | last post by:
when calling a object in an html, should I use self.objectname this.objectname or document.objectname? for example, i have a form called theform and a link called thelink i can call...
2
by: Paul Cook | last post by:
Hi, I have three tables: Countries: ID Country States: ID
6
by: C# Learner | last post by:
1) How often do you put regions into your code? a) very often b) occasionally c) infrequently d) never 2) If you didn't answer (d), what do you use regions for? a) hiding ugly code
4
by: geoffblanduk_nospam | last post by:
I have an NUnit test plan with well over 500 tests. I now need to produce a test plan document for these tests - documenting them one by one with Word is a painfull task. I was thinking that...
1
by: Brett | last post by:
I'd like to have all of my documentation in one place. I use the following for documenting code: - attributes for certain types of documentation - use of the C# generated inline XML...
1
by: Mike | last post by:
Does anyone know why MS didn't give VB.net the same self documenting capabilities as C# ( ///) ? It seems like a pretty big oversight. I also program in Java and I sure do miss that feature. Are...
7
by: gaidar | last post by:
Hi, everybody, I'm just wondering if someone really need stuff like this: http://msdn2.microsoft.com/library/ms123401.aspx. If you answer yes than explain, please. Thanks! Gaidar
6
by: Ikke | last post by:
Hi everybody, Can somebody tell me how to disable regions in Visual Studio 2005? I've already told VS not to collapse code to regions in the settings, but each time I open a new (existing)...
2
by: sajithamol | last post by:
What is a Self Documenting Code? wheather java is a self documenting code?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.