Skip to content

A question about classess.

Vaughan

Asked Mar 12, 2009, 5:02 PM EDT2 answers
Share
LinkedInX
 My code recently grew to a non-acceptable amount (1000+ lines) and it was getting hard to naviagate. Coming off from Visual Basic I used to be able to just plop all my variables, into a module. I have about 50 lines of those alone. So I figured I could toss those in a "class" and call it a day. Well, of course not. My other Main class is no longer picking them up. Perhaps, someone could tell me what is going on?

 I'd also appreciate it if someone could tell me how to call my void methods from a separate class, it'd be greatly valued!

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    You need to make sure your new class is a part of same namespace if you are using a namespace in your main class. Also, make sure you class is public. That's what I can think of.
    0
  • 0
    When i make a bigger program i use the

    #region  Name // the Name is what you want to call the region    Than you can use little plus/minus

                       // buttons to the left of the  #region to collapse or expand the region to keep things more organized

    #endregion

    You can than have all your var in one region. or your get set methods or whatever groups you have for the program

    Hope that helps a little if any

    0