Solved

I need to "hide" text in a class definition

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

26 Experts available now in Live!

Get 1:1 Help Now