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 it's said that writing into .NET Application Configuration Files is a Bad Idea?

1012


is it possible to access a remote web service Without UDDI?

1062


What is the use of console readkey in c#?

993


What is monitor in C#?

1060


What kind of the information stored inside the assembly?

1048


How do we achieve encapsulation in c#?

982


What do you mean by casting a data type?

976


Explain manifest & metadata in c#.

1060


How do you comment out code in c#?

956


What are controls in c#?

994


How to sign an assembly with strong name?

1060


Do loops c#?

941


Explain the difference between const and static read-only?

1063


Why delegates are required?

1016


What is Web.config?

1072