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...

Can we have private constructor in our class file. When we
are trying to create instance for the class will it create
or throw error regarding that?

Answer Posted / saiish bhat

ya,we have private constructor.but it wont throw an exception.

but u cant create an instance of p.c.

it is not possible to inherit from that class also.

ex:
private class a()
{

}

class b : a
{ }

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an inheritance ?Give an example in which inheritance is used?

1043


What is the difference between list and arraylist c#?

1032


Can we inherit private members of class in c#?

960


What do you mean by the delegate in c#?

906


Explain about generics in c#.net?

1038


Give examples for reference types?

983


If the original method is not static you can declare an override method to be static or not?

933


What is an escape sequence? Name some string escape sequences in c#.

916


What are the generation of Garbage Collection in C# .NET ?

953


What is the use of oops in c#?

907


What is concrete method in c#?

920


What is parameterized constructor?

925


When can a derived class override a base class member?

887


If multiple interfaces are inherited and they have conflicting method names; What will happen ?

957


What is use of list in c#?

857