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

Can a class have more than 1 destructor?

1024


Is it not possible to store a boolean value as a variable?

857


What is public or shared assemblies ?

1019


How can we sort an array in c#?

915


What is anonymous class in c#?

929


What is ienumerable t in c#?

870


How to put assembly in gac?

904


Why do we need reflection in c#?

915


How to find whether the application is run from inside ide or not?

1061


What is strongly typed view?

883


Is array immutable in c#?

875


What do u mean by thread safe?

933


Difference between call by value and call by reference in C#?

1020


What is uint64?

945


What can I create with c#?

917