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

Do loops c#?

845


Can we override constructor in c#?

887


Explain the access modifiers in c#?

893


How C# 4.0 supports dynamic programming language?

963


What is wpf c#?

841


In .NET how can you solve the DLL Hell problem?

1128


What is returned if you pass the value 12.34 to the parsefloat () function?

919


What is string programming language?

818


What is the example of predicate?

866


How do I trim a space in c#?

864


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

932


Is c# pass by reference?

851


What is the function of .IsDescendent()?

988


Between windows authentication and sql server authentication, which one is trusted and which one is untrusted?

931


How is a loop recorder monitored?

897