|
-
Dec 6th, 2010, 06:22 PM
#1
Thread Starter
Addicted Member
Is it possible to rename hidden selection in vb.net?
There's some code I have hidden via the Outline-Hide selection method, and the hidden code shows as a box with 3 dots. I saw that if you put some code in the #region - #end region area the hidden code box can be renamed, but region-end region cannot be used inside a property, so is there any other method to rename the hidden code in a property?
-
Dec 6th, 2010, 06:50 PM
#2
Re: Is it possible to rename hidden selection in vb.net?
I know of no way to do that. It's an interesting idea. I assume you want to be able to expand and compress different chunks of code to assist in organization. I've thought it would be convenient, as well, though only in the longest of methods.
My usual boring signature: Nothing
 
-
Dec 6th, 2010, 06:57 PM
#3
Thread Starter
Addicted Member
Re: Is it possible to rename hidden selection in vb.net?
yeah, here's what I've currently got but I am not understanding it, sounds like html code to me:
#Region " Property Variables "
''' <summary>
''' Property variable for the Font the user wishes to use
''' </summary>
''' <remarks></remarks>
Private _font As Font
''' <summary>
''' Property variable for the text to be printed
''' </summary>
''' <remarks></remarks>
Private _text As String
#End Region
-
Dec 6th, 2010, 08:00 PM
#4
Re: Is it possible to rename hidden selection in vb.net?
I'm not even sure I understood anything in this thread.... what is the problem exactly?
-tg
-
Dec 7th, 2010, 05:16 AM
#5
Re: Is it possible to rename hidden selection in vb.net?
The Region stuff is just a useful way to group blocks of code into collapsible sections (or regions). You cannot group a block of code inside a method or property. I don't know why this is, I don't see any real reason why this couldn't be possible except it being more work for the developers of the IDE perhaps.
Anyway, if your methods are so large that you want to use a region block inside them, then you should really consider refactoring: break those large methods up into smaller methods, and you probably won't even need the region blocks as the code will be grouped into smaller methods anyway.
As for the 'html code' you've shown us, that is quite unrelated to the region blocks. They are called XML Comments and are used to generate the Intellisense. For example, if I were to type "_font" in your code somewhere, Intellisense would pop up with the description: "Property variable for the Font the user wishes to use".
Furthermore, there are tools available (SandCastle, NDoc, etc) that can use these XML comments to automatically generate a help file or documentation in the style of MSDN. Very useful indeed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|