When static constructor is invoked?

Answer Posted / abhay k pandey

Static constructors can invoke mainly at two ocasions
1. Just before the first instance of the class is created [
in case this static contructor is there in non static class]
2. At the time any static member is accessed [ in case of
either static or non static classes ]

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of static members with example using c#.net.

484


What is the use of properties window?

495


How many bytes is an int c#?

487


Explain polymorphism in c# with a simple example?

513


How do you remove white spaces from a string?

491






Is it possible to have a static indexer in c#? Allowed in c#.

520


What is a value type in c#?

498


What is an object and a class?

548


What is thread in c#?

545


What is static class in C#?

566


What is multiple interface in c#?

513


What is managed or unmanaged code?

582


Difference between StackPanel and RelativePanel ?

568


Explain how do you convert a value-type to a reference-type?

446


How do you sort a list in c#?

483