Click here to Skip to main content
15,906,816 members
Home / Discussions / C#
   

C#

 
QuestionPolymorphism through Inheritance Pin
Ankit Rajput21-Apr-11 0:45
Ankit Rajput21-Apr-11 0:45 
AnswerRe: Polymorphism through Inheritance Pin
Pete O'Hanlon21-Apr-11 1:01
mvePete O'Hanlon21-Apr-11 1:01 
GeneralRe: Polymorphism through Inheritance Pin
Ankit Rajput21-Apr-11 1:08
Ankit Rajput21-Apr-11 1:08 
GeneralRe: Polymorphism through Inheritance Pin
Pete O'Hanlon21-Apr-11 1:11
mvePete O'Hanlon21-Apr-11 1:11 
GeneralRe: Polymorphism through Inheritance Pin
Lutosław21-Apr-11 3:13
Lutosław21-Apr-11 3:13 
GeneralRe: Polymorphism through Inheritance Pin
#realJSOP21-Apr-11 4:42
professional#realJSOP21-Apr-11 4:42 
AnswerRe: Polymorphism through Inheritance Pin
BobJanova21-Apr-11 1:09
BobJanova21-Apr-11 1:09 
AnswerRe: Polymorphism through Inheritance Pin
Wayne Gaylard21-Apr-11 1:22
professionalWayne Gaylard21-Apr-11 1:22 
Polymorphism by inheritance can be done by defining virtual methods in a base class and overriding those methods in the derived class giving each derived class it's own implementation something like this

C#
public class car
    {
        public car()
        {}

        public virtual void TurboBoost()
        {
            Console.WriteLine("Car speeding up.");
        }
    }

    public class SportsCar:car 
    {
        public SportsCar()
            : base()
        { }

        public override void TurboBoost()
        {
            Console.WriteLine("Sportscar is speeding up....");
        }
    }

...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....

GeneralRe: Polymorphism through Inheritance Pin
Ankit Rajput21-Apr-11 5:50
Ankit Rajput21-Apr-11 5:50 
GeneralRe: Polymorphism through Inheritance Pin
AspDotNetDev21-Apr-11 7:07
protectorAspDotNetDev21-Apr-11 7:07 
AnswerRe: Polymorphism through Inheritance Pin
Keith Barrow21-Apr-11 1:48
professionalKeith Barrow21-Apr-11 1:48 
AnswerRe: Polymorphism through Inheritance Pin
Prasanta_Prince21-Apr-11 2:20
Prasanta_Prince21-Apr-11 2:20 
GeneralRe: Polymorphism through Inheritance Pin
Ankit Rajput21-Apr-11 5:58
Ankit Rajput21-Apr-11 5:58 
QuestionAjaxupload Pin
dbongs20-Apr-11 23:47
dbongs20-Apr-11 23:47 
AnswerRe: Ajaxupload Pin
Pete O'Hanlon21-Apr-11 0:03
mvePete O'Hanlon21-Apr-11 0:03 
GeneralRe: Ajaxupload Pin
dbongs21-Apr-11 0:17
dbongs21-Apr-11 0:17 
GeneralRe: Ajaxupload Pin
Pete O'Hanlon21-Apr-11 0:42
mvePete O'Hanlon21-Apr-11 0:42 
GeneralRe: Ajaxupload Pin
Mycroft Holmes21-Apr-11 0:56
professionalMycroft Holmes21-Apr-11 0:56 
GeneralRe: Ajaxupload Pin
BobJanova21-Apr-11 1:07
BobJanova21-Apr-11 1:07 
GeneralRe: Ajaxupload Pin
#realJSOP21-Apr-11 4:50
professional#realJSOP21-Apr-11 4:50 
GeneralRe: Ajaxupload Pin
dbongs21-Apr-11 2:00
dbongs21-Apr-11 2:00 
GeneralRe: Ajaxupload Pin
Pete O'Hanlon22-Apr-11 9:50
mvePete O'Hanlon22-Apr-11 9:50 
GeneralRe: Ajaxupload Pin
#realJSOP21-Apr-11 4:49
professional#realJSOP21-Apr-11 4:49 
GeneralRe: Ajaxupload Pin
Keith Barrow21-Apr-11 7:10
professionalKeith Barrow21-Apr-11 7:10 
AnswerRe: Ajaxupload Pin
BobJanova21-Apr-11 0:26
BobJanova21-Apr-11 0:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.