Yes, it has singleton pattern,
Code to create a singleton object,
public partial class Form2 : Form
{
.....
private static Form2 inst;
public static Form2 GetForm
{
get
{
if (inst == null || inst.IsDisposed)
inst = new Form2();
return inst;
}
}
....
}
Invoke/Show this form,
Form2.GetForm.Show();
Related Contents:
- What is a singleton in C#?
- Is the C# static constructor thread safe?
- Thread Safe C# Singleton Pattern
- The need for volatile modifier in double checked locking in .NET
- Singleton by Jon Skeet clarification
- Unity singleton manager classes
- Serialize a Static Class?
- Singleton Pattern for C# [closed]
- Dependency Injection vs Service Location
- WPF: Cannot reuse window after it has been closed
- How to get C# Enum description from value? [duplicate]
- Writing data into CSV file in C#
- What is the purpose of the “Prefer 32-bit” setting in Visual Studio and how does it actually work?
- How to get DropDownList SelectedValue in Controller in MVC
- My Algorithm to Calculate Position of Smartphone – GPS and Sensors
- converting a base 64 string to an image and saving it
- Unexpected character encountered while parsing value
- Synchronously waiting for an async operation, and why does Wait() freeze the program here
- If a folder does not exist, create it
- Newtonsoft.JSON cannot convert model with TypeConverter attribute
- 5.7.57 SMTP – Client was not authenticated to send anonymous mail during MAIL FROM error
- ModelState.IsValid == false, why?
- How to find the difference between two images?
- Removing nodes from an XmlDocument
- JToken: Get raw/original JSON value
- ASP.NET MVC Global Variables
- How to serialize/deserialize a custom collection with additional properties using Json.Net
- Create DataTemplate in codebehind
- linq to entities doesn’t recognize a method
- Self referencing loop detected – Getting back data from WebApi to the browser
- Async implementation of IValueConverter
- How do I map XML to C# objects
- Command dotnet ef not found
- Delete last char of string
- How can I calculate divide and modulo for integers in C#?
- Specifying generic collection type param at runtime [duplicate]
- Could we save delegates in a file (C#)
- Simple Automapper Example
- Wrong line number on stack trace
- Finding all combinations of well-formed brackets
- Is it possible to pass properties as “out” or “ref” parameters?
- Retrieve the respective coordinates of all words on the page with itextsharp
- Visual Studio 2015 is extremely slow
- how to load all assemblies from within your /bin directory
- How do I get a list of installed updates and hotfixes?
- Installing Windows Service programmatically
- Getting the Last Insert ID with SQLite.NET in C#
- c# Visual Studio …adding references programmatically
- What is the function of the “this” keyword in a constructor?
- Does C# have a String Tokenizer like Java’s?