Click here to Skip to main content
16,012,316 members
Articles / Programming Languages / C#

How to call an overloaded constructors in C#

Rate me:
Please Sign up or sign in to vote.
4.67/5 (3 votes)
20 Sep 2011CPOL 12.1K   1  
All three of the Something methods could be replaced with a single definition of the form:public Something(string name = "default", index = -1){ myName = name; myIndex= index; DoStuff();}

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions