Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8328859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:34:35+00:00 2026-06-09T01:34:35+00:00

Sorry for the long title. Here is a sample situation that I encounter often

  • 0

Sorry for the long title. Here is a sample situation that I encounter often with windows forms applications. Much of the code in my application is centred around the UI so it so happens that most of my code is in the main class (MainWindow). Here is an analogy of how I am planning to break up my code. I will have to write a compressed file to the disk when the user performs an action. So it would look like this. Is this a good practice. This is just an attempt to organize my code better.

Public class MainForm

    Private Sub TempButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TempButton.Click
         Compression.CompressFile(fileStream)
    End Sub

End Class


Public Class Compression

     Private Sub New
          'Private constructor
     End Sub

     Public Shared Sub CompressFile(ByVal inFile as stream)

     End Sub

     Public Shared Sub DeCompressFile(ByVal inFile as stream)

     End Sub

End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:34:36+00:00Added an answer on June 9, 2026 at 1:34 am

    That is a common pattern.

    However, such functions should go in a Module (or static class in C#).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

sorry about the long title! I have a windows server 2003. I want to
Since the html code is so long and i can't post here. Sorry to
Sorry for long title but my concern is with constructing an ajax based application.
Sorry for the long and yet still somehow vague title! A friend of mine
Sorry for a long question and not a very descriptive title, but my problem
Firstly sorry for the long piece of code pasted below. This is my first
my code is too long so sorry :) @model IEnumerable<Osos11.Models.Customers> @Html.DevExpress().GridView( settings => {
Sorry for the long title, didn't want people just reading the title and not
Sorry for long winded title, this makes a lot more sense with an example.
(sorry about the long title) I have a custom object Person, which in turn

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.