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 8838781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:05:30+00:00 2026-06-14T10:05:30+00:00

I was considering using a Singleton pattern in a winforms application that I am

  • 0

I was considering using a Singleton pattern in a winforms application that I am working on, but a lot of people seem to think that singletons are evil. I was planning on making a “Main Menu” form which is a singleton. I can’t think of any reason that I would want multiple instances of my Main Menu, and it is always going to be the first form that comes up, so I am not concerned with wasting resources if it gets instantiated unnecessarily.

Also, I could see issues arising if there are multiple instances of the Main Menu. For example, if another form has a “Main Menu” button and there are multiple instances of the Main Menu, then the decision of which instance to show seems ambiguous.

Also, if I have another winform which has to look at the state of the program to determine whether there is already an instance of the main menu, then I feel like I am breaking modularity, though I might be wrong.

Should I be avoiding the use of a singleton in this case or would it be better to make the Main Menu static?

I just started using c# a couple days ago, and I haven’t really done much with OOP in the last few years, so I apologize if this is a stupid question.

Thanks

  • 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-14T10:05:31+00:00Added an answer on June 14, 2026 at 10:05 am

    Is MainMenu shown all the time? If not, it would make sense to release the old instance when it’s closed and create a new one every time you need to open it. This way other modules won’t need to know of its instances, they’ll just create one when they need to open it.

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

Sidebar

Related Questions

I am considering using Firebase for an application that should people to use full-text
We're considering using Python (IronPython, but I don't think that's relevant) to provide a
I'm considering using the Google Contacts API for a webapp, but I'm worried that
My code is using a third party library that employ a singleton pattern deep
I'm considering using a TVar to store some state in a web application (that
We are considering using PhoneGap for an iPad application that we are developing. We
We are considering using Cassette in our asp.net web application which might be accessed
I'm considering using memcached (at some point) in my application i'm currently developing. Eventually,
I am considering using ClickOnce for a legacy Windows Forms application. I have several
I'm considering using CouchDB for an upcoming site, but I'm a little confused as

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.