Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Polymorphism in OOPS

This is a discussion on Polymorphism in OOPS within the OOPS forums, part of the Software Development category; Can we implement polymorphism in asp.net...

Go Back   Geeks Talk > Software Development > OOPS
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

OOPS Object-Oriented Programming Concepts

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2009
Junior Member
 
Join Date: Jan 2007
Location: Hyderabad
Posts: 11
Thanks: 4
Thanked 1 Time in 1 Post
harini_sree is on a distinguished road
Polymorphism in OOPS

Can we implement polymorphism in asp.net
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-01-2009
Expert Member
 
Join Date: May 2009
Location: Bangalore
Posts: 984
Thanks: 155
Thanked 420 Times in 201 Posts
rijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nice
Re: Polymorphism in OOPS

Hi,

Yes. U can implement polymorphism in asp.net

Just look at the example.....

1)Compile Time Polymorphism

Method Overloading

class A1
{
void hello()
{ Console.WriteLine(“Hello”); }

void hello(string s)
{ Console.WriteLine(“Hello {0}”,s); }
}


2)Run Time Polymorphism

Method Overriding

Class parent
{
virtual void hello()
{ Console.WriteLine(“Hello from Parent”); }
}

Class child : parent
{
override void hello()
{ Console.WriteLine(“Hello from Child”); }
}

static void main()
{
parent objParent = new child();
objParent.hello();
}
//Output
Hello from Child.


If any query let me know.....

Thanks & Regards,

Riju
Reply With Quote
  #3 (permalink)  
Old 07-01-2009
Junior Member
 
Join Date: Jan 2007
Location: Hyderabad
Posts: 11
Thanks: 4
Thanked 1 Time in 1 Post
harini_sree is on a distinguished road
Re: Polymorphism in OOPS

Hi,

Thank for your quick response
Reply With Quote
Reply

  Geeks Talk > Software Development > OOPS

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Polymorphism stylish16 OOPS 6 09-02-2009 05:50 AM
Polymorphism Martina VB.NET 6 01-01-2009 03:01 AM
Polymorphism kalayama OOPS 10 10-02-2008 01:49 AM
Dynamic Polymorphism in C mkannanmca86 C and C++ 1 05-26-2008 04:30 AM
Polymorphism......... Sampath_Java Java 4 09-12-2007 01:50 AM


All times are GMT -4. The time now is 10:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved