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

Is c# good for games?

857


What is thread in c#?

930


Why do we use Design Pattern in C#?

1009


How can it prevents DLL Hell assembly versioning in .NET?

1004


What is the usage of transponders?

936


Does google use c#?

878


How do I create a single-file assembly?

997


What are Uses of CLR

1004


Explain about finalize method?

914


How more than one version of an assembly can keep in same place?

952


How do I open the console window?

1013


Explain more on CLR

1136


How do you convert byte array to hexadecimal string, and vice versa?

1079


What is Custom attribute? How to create? If I'm having custom attribute in an assembly, how to say that name in the code?

910


What is native image generator (ngen.exe)?

1211