Solved

I need to "hide" text in a class definition

Posted on 2004-09-07
4
216 Views
Last Modified: 2010-04-23
Folks:

I am new to VB.net.  I have experience in C++.

I have a class module (call it a.vb) that contains all the code necessary for a class I have designed.  It actually works.  (Scary)  My issue is, this class contains a lot of private stuff - enums, structures, variables, interfaced to legacy DLLs, etc.  I always code private data before any functions or procedures; and I always code New() first.  In this particular case, new is around line 800.  This is annoying.

I want to do one of two things -
1)  Move all the junk to another file and #include it.  (Excuse my C.)

2)  The IDE has methods of collapsing definitions of procedures etc.  Is there a way to define a section - such that everything between the section and end section will collapse?

Answers to eather question will be appreciated.  I'll split points if I get good answers to both.  Also, if there is a third possibility - let me know.  As I said - I am new and want to learn the new tricks.

Thanks  
0
Comment
Question by:jflanner
  • 2
4 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12000251
#region foo
//code
#end region



you can put the code into a seperate class easily, if they are in the same namespace there is no need to #include.

namespace foo
    friend class bar
         public static test as integer
    end class
end namespace

namespace foo
    public class t
         public function get foo as integer
                return bar.test
         end function
    end class
end namespace
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 500 total points
ID: 12000267
sorry its ...

#Region " You region name"
#End Region
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.NET Repostiory Pattern 7 49
I need help converting a bitmap to an image in VB.Net 1 43
SQL LINE CONTINUATION ISSUE 12 37
.NET 2008 VB and C# 6 39
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question