Click here to Skip to main content
15,903,362 members
Home / Discussions / C#
   

C#

 
GeneralMethodology for Switch based on an object Pin
Shayne Husson14-Jul-04 18:14
Shayne Husson14-Jul-04 18:14 
GeneralRe: Methodology for Switch based on an object Pin
exhaulted14-Jul-04 22:17
exhaulted14-Jul-04 22:17 
GeneralRe: Methodology for Switch based on an object Pin
Werdna16-Jul-04 5:54
Werdna16-Jul-04 5:54 
QuestionHow to decide Page Break insertion criteria in RTF doc? Pin
sachinkalse14-Jul-04 16:38
sachinkalse14-Jul-04 16:38 
AnswerRe: How to decide Page Break insertion criteria in RTF doc? Pin
Nick Parker14-Jul-04 17:07
protectorNick Parker14-Jul-04 17:07 
GeneralRe: How to decide Page Break insertion criteria in RTF doc? Pin
sachinkalse14-Jul-04 20:32
sachinkalse14-Jul-04 20:32 
GeneralGENERIC SINGLETON (using... err... generics.) Pin
Anonymous14-Jul-04 16:01
Anonymous14-Jul-04 16:01 
GeneralRe: GENERIC SINGLETON (using... err... generics.) Pin
Nick Parker14-Jul-04 16:53
protectorNick Parker14-Jul-04 16:53 
Here is a singleton in C#:


public sealed class SqlManager
{
    private SqlManager(){}
    private static SqlManager instance;
    private static object syncRoot = new Object();
    public static SqlManager Instance
    {
        get
        {
            if(SqlManager.instance == null)
            {
                lock(syncRoot)
                {
                    if(SqlManager.instance == null)
                    {
                        SqlManager mgr = new SqlManager();
                        System.Threading.Thread.MemoryBarrier();
                        SqlManager.instance = mgr;
                    }
                }
            }
            return SqlManager.instance;
        }
    }
}


- Nick Parker
My Blog | My Articles

Generalubiquitous error Pin
Anonymous14-Jul-04 15:23
Anonymous14-Jul-04 15:23 
GeneralRe: ubiquitous error Pin
Nick Parker14-Jul-04 17:00
protectorNick Parker14-Jul-04 17:00 
GeneralCrystal Report Pages Pin
Saktya14-Jul-04 14:29
Saktya14-Jul-04 14:29 
GeneralRe: Crystal Report Pages Pin
Pain_Elemental14-Jul-04 21:44
Pain_Elemental14-Jul-04 21:44 
QuestionFree menu/toolbar library? Pin
Arun Bhalla14-Jul-04 12:46
Arun Bhalla14-Jul-04 12:46 
AnswerRe: Free menu/toolbar library? Pin
Werdna16-Jul-04 5:58
Werdna16-Jul-04 5:58 
GeneralRegistering subclasses with their base Pin
khan200014-Jul-04 12:11
khan200014-Jul-04 12:11 
GeneralProblem accessing a function in a nested class Pin
crushinghellhammer14-Jul-04 11:07
crushinghellhammer14-Jul-04 11:07 
GeneralRe: Problem accessing a function in a nested class Pin
Nick Parker14-Jul-04 11:42
protectorNick Parker14-Jul-04 11:42 
GeneralRe: Problem accessing a function in a nested class Pin
crushinghellhammer14-Jul-04 11:57
crushinghellhammer14-Jul-04 11:57 
GeneralRe: Problem accessing a function in a nested class Pin
crushinghellhammer14-Jul-04 12:25
crushinghellhammer14-Jul-04 12:25 
GeneralRe: Problem accessing a function in a nested class Pin
Nick Parker14-Jul-04 13:19
protectorNick Parker14-Jul-04 13:19 
GeneralRe: Problem accessing a function in a nested class Pin
crushinghellhammer14-Jul-04 13:29
crushinghellhammer14-Jul-04 13:29 
GeneralRe: Problem accessing a function in a nested class Pin
Nick Parker14-Jul-04 15:19
protectorNick Parker14-Jul-04 15:19 
GeneralFileStream / BinaryReader Pin
PaleyX14-Jul-04 10:31
PaleyX14-Jul-04 10:31 
GeneralRe: FileStream / BinaryReader Pin
Nick Parker14-Jul-04 11:54
protectorNick Parker14-Jul-04 11:54 
QuestionPlease i need helping in TAPI application ? Pin
Wail A.Salem14-Jul-04 10:18
Wail A.Salem14-Jul-04 10:18 

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.