CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Posts
    3

    [RESOLVED]How is this polymorphism ... [/RESOLVED]

    I am newbie and tryin to learn C#.. I understand what is polymorphism but I dont understand how
    this is polymorphic behaviour

    1. Create a new Windows application
    2. Add a new Button control using the Toolbox, and position it in the center of Form1

    private void button1_Click(object sender, System.EventArgs e)
    {

    ((Button)sender).Text = "Clicked!"; //HOW IS THIS Polymorphic behaviour

    }
    Last edited by Skhasan; April 12th, 2011 at 07:09 PM. Reason: [RESOLVED]

  2. #2
    Join Date
    May 2007
    Posts
    1,546

    Re: How is this polymorphism ...

    It's not polymorphism. If you search for the term you should be able to find a ton of good examples of it though.
    www.monotorrent.com For all your .NET bittorrent needs

    NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.

  3. #3
    Join Date
    Mar 2011
    Posts
    3

    Re: How is this polymorphism ...

    Thanks though for confirming my suspicions...

    stupid book Beginning Visual C# 2010 mentions it as polymorphic behavior.......

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: How is this polymorphism ...

    mark your thread resolved please.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured