Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

When static constructor is invoked?

Answer Posted / shadab alam

static costructor of a class invoked automatically when
class is loded provided Main method is given.There is no
need to create instance of a class.

we can prove it by following program in c#

using System;
class aa
{
static aa()
{
Console.Write("without instance");
}
public static void Main()
{

}

}


output will be
---------------
without instance

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use get and set method in c#?

948


Is there regular expression (regex) support available to c# developers?

971


Is c# pass by reference?

890


Explain the advantage of using system.text.stringbuilder over system.string?

879


Is php better than c#?

916


What is Fragmentation and its Types?

999


What is difference between for and foreach loop in c#?

1018


What does question mark mean in c#?

987


Define encapsulation?

1081


Do events have return type c#?

931


Can you inherit multiple classes in c#?

1078


What is meant by enumerable in c#?

960


What is a event in c#?

878


Explain the process of Serialization?

1002


Why would you use a class property in c#?

910