C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




oops concept


Posted Date: 20 Jun 2008      Total Responses: 5

Posted By: neeraj sahani       Member Level: Bronze     Points: 1



trying to make a simple remaider application using property!
i need two objects.. 1 parameterised constructor for proprty, other default constructor for overloading function.
how & when to use default const.. in property class or form class





Responses

Author: Rajaram    20 Jun 2008Member Level: SilverRating:     Points: 2

Default Constructor:
When you want to initialise variables in the class to its default values.

Parameterised Constructor:
When you want to initialise class valiables with externel values.



Author: Rohit    20 Jun 2008Member Level: GoldRating:     Points: 2

Default constructor initializes the variables of your class with default values and the parameterised constructors have some parameters. Each class by default have a default constructor, whereas you create the parameterised constructors
e.g:
private class Class1
{
//Parameterised Constructor
public Class1(inta, int b)
{
}
}

Check this link for more info
http://www.c-sharpcorner.com/UploadFile/rajeshvs/ConsNDestructorsInCS11122005010300AM/ConsNDestructorsInCS.aspx



Author: Gaurav Agrawal    20 Jun 2008Member Level: DiamondRating:     Points: 2

http://www.rupeemail.in/rupeemail/invite.do?in=MTAxNTM0JSMlS0hqblZtUFI0c3BmTmw2azNNVDhyb1dCaA==

Register on this site by this link



Author: chandramohan    21 Jun 2008Member Level: GoldRating:     Points: 1

http://www.iam.ubc.ca/guides/javatut99/java/concepts/index.html

http://www.c-sharpcorner.com/UploadFile/eecabral/OOPSand.NET211102005075520AM/OOPSand.NET2.aspx

www.c-sharpcorner.com/UploadFile/eecabral/OOPSand.NET211102005075520AM/OOPSand.NET2.aspx
luna2.informatik.uni-osnabrueck.de/alumni/bernd/oops/staff/oops_tutorial.pdf



Author: Arun K    23 Jun 2008Member Level: GoldRating:     Points: 3

When you want to give default values then u can use Default construcotor
otherwise it you want to give values from outside then you can use
parameterised constructor.



Post Reply
You must Sign In to post a response.
Next : Virender Kumar
Previous : regarding dropdown
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use