----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: VaibhavModak Message 3 in Discussion Hi, In addition to what Raghu said, Overloading is useful when you have to design a System which needs procedures that can work on different data types. For example, a class that can display several different data types could have a Display procedures that look like this: Overloads Sub Display(ByVal theChar As Char) ' Add code that displays Char data. End Sub Overloads Sub Display(ByVal theInteger As Integer) ' Add code that displays Integer data. End Sub Overloads Sub Display(ByVal theDouble As Double) ' Add code that displays Double data. End Sub Without overloading, you would need to create distinct names for each procedure, even though they do the same thing: Sub DisplayChar(ByVal theChar As Char) ' Add code that displays Char data. End Sub Sub DisplayInt(ByVal theInteger As Integer) ' Add code that displays Integer data. End Sub Sub DisplayDouble(ByVal theDouble As Double) ' Add code that displays Double data. End Sub HTH, Regards, Vaibhav Modak ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
