Solved

I need to "hide" text in a class definition

Posted on 2004-09-07
4
207 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now