Welcome, Guest Ohm namah shivoy
www.faqpanel.com
Home | ASP.Net | C-Sharp | Winforms | MS SQL | AJAX | XML | .Net Training*** | Search
Invite friends 
Extras 
VS Tips & Tricks
Top 10 .Net Tools
Special folders in ASP.Net
VS Find Combobox
 C-Sharp (C#) Interview Questions and Answers
What is the static constructor in C#?
If your class declares a static constructor, you are guaranteed that the static constructor will run before any instance of your class is created.

Eg. -
public class Time { private static string Name;
static Time () { Name = "Time"; } }

Notice that there is no access modifier before the static constructor. Access modifiers are not allowed on static constructors. In addition, because this is a static member method, you can not access non-static variables and so Name must be declared a static member variable.

Note: You can not control exactly when a static constructor will run, but you do know that it will be after the start of your program and before the first instance is created, Because of this, you can not assume ( or determine ) whether an instance is being created.
What does the parameter Initial Catalog define inside Connection String?
Can multiple catch blocks be executed for a single try statement?
Can I use MySQL with C#?
Does C# do array bounds checking?
How many .Net languages can a single .Net DLL contain?
How do I create an instance of a type if I only know its name?
Is it possible to use multiple inheritance in .Net?
What namespaces are necessary to create a localized application?
What are Resource Files? How are they used in .Net?
What are the Keywords in C#?