Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2007, 05:24 AM
Registered User
 
Join Date: May 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Overloading

Hi everybody!

I want to know that "in .net Overloading is not a kind of polymorphism implementation?". Some friends are telling that polymorphism implemented only at run-time rather compile time. It is true. If yes Why?

Please help me to make a conclusion.
 
Old July 17th, 2007, 12:30 AM
Authorized User
 
Join Date: Jul 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Polymorphism may be implemented both at runtime and compile time.

 A function having 2 definitions (with different types of signatures) is truely a polymorphic function, and when we build the source, we easily see that this is digested by the .NET compiler during compile time. So we say its polymorphic at compile time.

 Now when a function is used depending on user's input (when the application is running), then any of these 2 functions may be called depending on the activities happening inside the application, this scenario is said to be a runtime polymorphic behavior.

For more information, read this...

 http://www.dotnetuncle.com/OOPS/17_overloading.aspx

 http://www.dotnetuncle.com/OOPS/13_polymorphism.aspx

 HTH

 Cheers

 VK

http://www.dotnetuncle.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Overloading Overriding arv1980 VS.NET 2002/2003 2 January 22nd, 2006 12:55 AM
Polymorphism->overloading? naveen J2EE 2 October 19th, 2005 02:34 AM
Operator Overloading In Inheritance ahmedsalam C# 0 October 18th, 2005 11:25 AM
enum toString() overloading kramis8 C# 0 November 21st, 2004 07:55 PM
Overloading Initialize_Class sg48 Excel VBA 1 July 11th, 2003 07:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.