When static constructor is invoked?

Answer Posted / sujai cn

A static constructor is executed when that class is loaded
in to memory for the first time . i.e., when ever an object
is created or a static method is invoked using class name.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Will the following code compile?

559


What is a linq in c#?

484


What are the 3 logical operators?

567


What is an assembly qualified name? Is it a filename? How is it different?

501


Why do we use lambda expression in c#?

506






What is xml comments in c#?

495


What all details the assembly manifest will contain?

434


What language is c# similar to?

488


When should you use generics?

515


What is datatable and dataset in c#?

488


What is virtual in c#?

480


What are async and await?

541


Can you describe iuknown interface in short?

619


Can a class have static constructor?

553


How the versioning applies to Assemblies or can you explain version numbers?

573