Click here to Skip to main content
15,915,328 members
Home / Discussions / C#
   

C#

 
GeneralRe: Assembly - from Unmanaged Pin
Kant24-Mar-04 11:07
Kant24-Mar-04 11:07 
GeneralRe: Assembly - from Unmanaged Pin
Heath Stewart24-Mar-04 11:22
protectorHeath Stewart24-Mar-04 11:22 
GeneralRe: Assembly - from Unmanaged Pin
Jeremy Kimball25-Mar-04 6:16
Jeremy Kimball25-Mar-04 6:16 
GeneralRe: Assembly - from Unmanaged Pin
Heath Stewart25-Mar-04 8:08
protectorHeath Stewart25-Mar-04 8:08 
GeneralRe: Assembly - from Unmanaged Pin
Jeremy Kimball25-Mar-04 9:05
Jeremy Kimball25-Mar-04 9:05 
GeneralRe: Assembly - from Unmanaged Pin
Heath Stewart25-Mar-04 9:35
protectorHeath Stewart25-Mar-04 9:35 
GeneralRe: Assembly - from Unmanaged Pin
Jeremy Kimball25-Mar-04 9:46
Jeremy Kimball25-Mar-04 9:46 
GeneralTo Heath (we talked about this subject before) Pin
profoundwhispers24-Mar-04 9:10
profoundwhispers24-Mar-04 9:10 
public sealed class Singleton<br />
{<br />
    static readonly Singleton instance=new Singleton();<br />
<br />
    // Explicit static constructor to tell C# compiler<br />
    // not to mark type as beforefieldinit<br />
    static Singleton()<br />
    {<br />
    }<br />
<br />
    Singleton()<br />
    {<br />
    }<br />
<br />
    public static Singleton GetInstance()<br />
    {<br />
        return instance;<br />
    }<br />
}


That was from this[^] article.

Maybe you can answer this question:

Is there an explicit need there for the private constructor to avoid initialization? If we remove it completely, will .NET supply a default public parameterless constructor?


Sammy

"A good friend, is like a good book: the inside is better than the cover..."
GeneralRe: To Heath (we talked about this subject before) Pin
Tom Larsen24-Mar-04 9:14
Tom Larsen24-Mar-04 9:14 
GeneralRe: To Heath (we talked about this subject before) Pin
profoundwhispers24-Mar-04 9:32
profoundwhispers24-Mar-04 9:32 
GeneralRe: To Heath (we talked about this subject before) Pin
Heath Stewart24-Mar-04 9:15
protectorHeath Stewart24-Mar-04 9:15 
GeneralRe: To Heath (we talked about this subject before) Pin
profoundwhispers24-Mar-04 9:31
profoundwhispers24-Mar-04 9:31 
GeneralRe: To Heath (we talked about this subject before) Pin
Heath Stewart24-Mar-04 9:39
protectorHeath Stewart24-Mar-04 9:39 
GeneralWindows Media Player Pin
antoine@orchus-tech24-Mar-04 7:36
antoine@orchus-tech24-Mar-04 7:36 
GeneralRe: Windows Media Player Pin
Heath Stewart24-Mar-04 8:35
protectorHeath Stewart24-Mar-04 8:35 
GeneralRe: Windows Media Player Pin
antoine@orchus-tech24-Mar-04 9:38
antoine@orchus-tech24-Mar-04 9:38 
GeneralRe: Windows Media Player Pin
Heath Stewart24-Mar-04 9:42
protectorHeath Stewart24-Mar-04 9:42 
GeneralRe: Windows Media Player Pin
antoine@orchus-tech24-Mar-04 9:58
antoine@orchus-tech24-Mar-04 9:58 
GeneralRe: Windows Media Player Pin
Stephane Rodriguez.24-Mar-04 19:03
Stephane Rodriguez.24-Mar-04 19:03 
QuestionHow to enumerate an enum. Pin
Anonymous24-Mar-04 6:56
Anonymous24-Mar-04 6:56 
AnswerRe: How to enumerate an enum. Pin
CStiefeling24-Mar-04 8:16
CStiefeling24-Mar-04 8:16 
AnswerRe: How to enumerate an enum. Pin
T Manjaly24-Mar-04 11:49
T Manjaly24-Mar-04 11:49 
GeneralaxWebBrowser DocumentComplete Pin
Jasper4C#24-Mar-04 6:47
Jasper4C#24-Mar-04 6:47 
GeneralRe: axWebBrowser DocumentComplete Pin
Heath Stewart24-Mar-04 8:40
protectorHeath Stewart24-Mar-04 8:40 
GeneralRe: axWebBrowser DocumentComplete Pin
Dave Kreskowiak24-Mar-04 8:42
mveDave Kreskowiak24-Mar-04 8:42 

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.