Click here to Skip to main content
15,911,531 members
Home / Discussions / C#
   

C#

 
GeneralRe: .Net Profiler Pin
Simon P Stevens14-Apr-08 3:33
Simon P Stevens14-Apr-08 3:33 
GeneralRe: .Net Profiler Pin
Pete O'Hanlon14-Apr-08 3:50
mvePete O'Hanlon14-Apr-08 3:50 
Generalconstruction order Pin
George_George14-Apr-08 2:51
George_George14-Apr-08 2:51 
Hello everyone,


For the following code, it is correct to say that,

1. obj1 will be instialized when .NET Runtime loads class Foo and before any instance is created?

2. obj2 will be created each time we create an instance of Foo, and obj2 will be called before constructor?

My question is whether my understanding (1) and (2) are correct?

class Foo
{
    static private object obj1 = new object();
    private object obj2 = new object();
    public Foo()
    {
    }
}



thanks in advance,
George
GeneralRe: construction order Pin
Christian Graus14-Apr-08 3:08
protectorChristian Graus14-Apr-08 3:08 
GeneralRe: construction order Pin
George_George14-Apr-08 3:11
George_George14-Apr-08 3:11 
GeneralRe: construction order Pin
Guffa14-Apr-08 3:42
Guffa14-Apr-08 3:42 
GeneralRe: construction order Pin
George_George14-Apr-08 4:00
George_George14-Apr-08 4:00 
GeneralHiding a tabPage Pin
Harvey Saayman14-Apr-08 2:40
Harvey Saayman14-Apr-08 2:40 
GeneralRe: Hiding a tabPage Pin
phannon8614-Apr-08 2:53
professionalphannon8614-Apr-08 2:53 
GeneralRe: Hiding a tabPage Pin
Harvey Saayman14-Apr-08 2:56
Harvey Saayman14-Apr-08 2:56 
GeneralRe: Hiding a tabPage Pin
phannon8614-Apr-08 2:59
professionalphannon8614-Apr-08 2:59 
GeneralRe: Hiding a tabPage Pin
Harvey Saayman14-Apr-08 3:02
Harvey Saayman14-Apr-08 3:02 
Generalthread safety in Windows Service design Pin
George_George14-Apr-08 2:28
George_George14-Apr-08 2:28 
GeneralRe: thread safety in Windows Service design Pin
Dario Solera14-Apr-08 2:35
Dario Solera14-Apr-08 2:35 
GeneralRe: thread safety in Windows Service design Pin
George_George14-Apr-08 2:44
George_George14-Apr-08 2:44 
GeneralRe: thread safety in Windows Service design Pin
Dario Solera14-Apr-08 3:00
Dario Solera14-Apr-08 3:00 
GeneralRe: thread safety in Windows Service design Pin
George_George14-Apr-08 3:04
George_George14-Apr-08 3:04 
GeneralRe: thread safety in Windows Service design Pin
Dario Solera14-Apr-08 3:20
Dario Solera14-Apr-08 3:20 
GeneralRe: thread safety in Windows Service design Pin
George_George14-Apr-08 3:24
George_George14-Apr-08 3:24 
GeneralMSAccess DB import to SQL server using C# Pin
new2pgrmg14-Apr-08 2:24
new2pgrmg14-Apr-08 2:24 
GeneralRe: MSAccess DB import to SQL server using C# Pin
Mark J. Miller14-Apr-08 5:05
Mark J. Miller14-Apr-08 5:05 
GeneralRe: MSAccess DB import to SQL server using C# Pin
new2pgrmg14-Apr-08 18:11
new2pgrmg14-Apr-08 18:11 
Generalreg invoking vb6's method in c# Pin
Member 400849214-Apr-08 1:49
Member 400849214-Apr-08 1:49 
GeneralRe: reg invoking vb6's method in c# Pin
N a v a n e e t h14-Apr-08 1:53
N a v a n e e t h14-Apr-08 1:53 
GeneralRe: reg invoking vb6's method in c# Pin
Member 400849214-Apr-08 19:36
Member 400849214-Apr-08 19:36 

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.