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

Are tuples mutable c#?

884


Is c# queue thread safe?

904


What is difference between managed and unmanaged code?

950


Can hashtable have duplicate keys in c#?

841


What is string method in c#?

871


What is garbage collection? How to force garbage collector to run?

861


Define c# i/o classes?

886


What exactly happens when we debug and build the program?

2545


What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?

1099


Which of the following API is used to hide a window?

994


What is readline library?

919


What does return do in for loop?

885


Could you explain the difference between func vs action vs predicate?

821


what is partial assembly reference

910


What are the return types in c#?

924