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

C# provides a default constructor for me. I write a
constructor that takes a string as a parameter, but want to
keep the no parameter one. How many constructors should I write?

Answer Posted / tsahi

that depends on weather you are writing a class or a struct.
in a class, the first answer given is correct (i.e. two
constructors). in a struct, you cannot write a default
constructor, and you will always have the automatically
generated one, in addition to any other constructor you may
write by your self.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is appdomain in c#?

838


Is c++ or c# better?

888


Is system a class in c#?

867


What is difference between singleordefault and firstordefault?

853


What is difference between float and integer?

944


Which framework is best for desktop application?

930


Which are the access modifiers available in c#?

888


If you want to write your own dot net language, what steps you will u take care?

921


Explain “static” keyword in c#?

832


What is integer c#?

854


What is marshalling and what are different kinds of marshalling?

857


What is the difference between Decorator and Adapter pattern?

906


What is gac? What are the steps to create an assembly and add it to the gac?

859


Define delay signing?

883


How can we sort an array in c#?

852