Click here to Skip to main content
15,936,247 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to create array of label ? Pin
Office Lineman19-Apr-06 13:03
Office Lineman19-Apr-06 13:03 
Questione-mail through Outlook. HOW??? Pin
Vasya - dragon19-Apr-06 11:21
Vasya - dragon19-Apr-06 11:21 
QuestionRemoting: Reference to the Remote Object Instance? (Singleton) Pin
eclipse2k119-Apr-06 11:16
eclipse2k119-Apr-06 11:16 
AnswerRe: Remoting: Reference to the Remote Object Instance? (Singleton) Pin
LongRange.Shooter20-Apr-06 3:52
LongRange.Shooter20-Apr-06 3:52 
QuestionRe: Remoting: Reference to the Remote Object Instance? (Singleton) Pin
eclipse2k120-Apr-06 11:16
eclipse2k120-Apr-06 11:16 
AnswerRe: Remoting: Reference to the Remote Object Instance? (Singleton) Pin
Tim Paaschen20-Apr-06 20:27
Tim Paaschen20-Apr-06 20:27 
JokeRe: Remoting: Reference to the Remote Object Instance? (Singleton) Pin
eclipse2k121-Apr-06 9:59
eclipse2k121-Apr-06 9:59 
GeneralRe: Remoting: Reference to the Remote Object Instance? (Singleton) Pin
Tim Paaschen23-Apr-06 20:54
Tim Paaschen23-Apr-06 20:54 
In C# it is really simple to create a Singleton. You don't have to use the double-checked locked accessor as it is used in C++ or Java.

public class Server
{
	/// <summary>
	/// This is the only existing instance of Server.
	/// </summary>
	private static readonly Server	_instance = new Server();
 

	/// <summary>
	/// Make the constuctor private.
	/// </summary>
	private Server()
	{
	}
 

	/// <summary>
	/// Get access to the Server's instance.
	/// </summary>
	public static Server Instance
	{
		get{ return Server._instance; }
	}
}


Within your code you now must use Server.Instance instead of new Server(). Thus your "Server Host" and your "Remoting Plugin" will access the same object.
QuestionNot logging in application log Pin
Dpriya19-Apr-06 11:11
Dpriya19-Apr-06 11:11 
AnswerRe: Not logging in application log Pin
Ricardo Casquete19-Apr-06 23:12
Ricardo Casquete19-Apr-06 23:12 
QuestionNotifyIcon - Changing the icon Pin
eggsovereasy19-Apr-06 11:03
eggsovereasy19-Apr-06 11:03 
AnswerRe: NotifyIcon - Changing the icon Pin
Josh Smith19-Apr-06 12:38
Josh Smith19-Apr-06 12:38 
QuestionSerialization of Parent with Child Objects Pin
sharkbait19-Apr-06 10:29
sharkbait19-Apr-06 10:29 
AnswerRe: Serialization of Parent with Child Objects Pin
Josh Smith19-Apr-06 10:38
Josh Smith19-Apr-06 10:38 
GeneralRe: Serialization of Parent with Child Objects Pin
sharkbait19-Apr-06 10:59
sharkbait19-Apr-06 10:59 
GeneralRe: Serialization of Parent with Child Objects Pin
Josh Smith19-Apr-06 13:04
Josh Smith19-Apr-06 13:04 
AnswerRe: Serialization of Parent with Child Objects Pin
LongRange.Shooter19-Apr-06 10:44
LongRange.Shooter19-Apr-06 10:44 
QuestionCrystal: Formula missing in subreports Pin
axio19-Apr-06 10:02
axio19-Apr-06 10:02 
AnswerRe: Crystal: Formula missing in subreports Pin
axio19-Apr-06 10:13
axio19-Apr-06 10:13 
QuestionControl Hosting in DataGridViewCell Pin
firestorm35319-Apr-06 9:23
firestorm35319-Apr-06 9:23 
AnswerRe: Control Hosting in DataGridViewCell Pin
firestorm35320-Apr-06 5:04
firestorm35320-Apr-06 5:04 
QuestionWSE 2.0, TCP question. Pin
JasenF19-Apr-06 9:17
professionalJasenF19-Apr-06 9:17 
AnswerRe: WSE 2.0, TCP question. Pin
Michael A. Barnhart20-Apr-06 1:45
Michael A. Barnhart20-Apr-06 1:45 
QuestionVectorisation geometric shape in c# Pin
Marco Delgado19-Apr-06 8:31
Marco Delgado19-Apr-06 8:31 
AnswerRe: Vectorisation geometric shape in c# Pin
Ravi Bhavnani19-Apr-06 9:07
professionalRavi Bhavnani19-Apr-06 9:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.