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 string concatenation?

913


What do you mean by object pooling?

931


What is hierarchical inheritance in c#?

906


Is datetime immutable c#?

862


What is javascriptserializer c#?

930


If you donot specify an access modifier for a method, what is the default access modifier?

968


how to prevent a class from being inherited in c#.net?

905


What is c# and why it is used for?

892


Difference between Value type & reference types ? and give the example in .Net?

875


What is a private method in c#?

957


How does inheritance work in c#?

1057


What is the difference between virtual method and abstract method?

919


What is instantiating a class in c#?

954


List some of the common data providers for ado.net framework?

806


What is a byte in c#?

917