TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Maha
NA
0
326.1k
Runtime polymorphism
Sep 16 2012 11:02 AM
This program is in the following website
http://www.c-sharpcorner.com/uploadfile/bubbles4800/polymorphism-in-C-Sharp/
. Why the output is saying that
"This is not Runtime polymorphism"
.
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace ConsoleApplication2
{
public class Polymorphism
{
public virtual void DisplayName()
{
Console.WriteLine("This is Runtime polymorphism");
}
}
class Polymorphism1 : Polymorphism
{
public override void DisplayName()
{
Console.WriteLine("This is not Runtime polymorphism");
}
}
class Program
{
static void Main(string[] args)
{
Polymorphism1 obj = new Polymorphism1();
obj.DisplayName();
Console.ReadKey();
}
}
}
//This is not Runtime polymorphism
Reply
Answers (
2
)
Rename Text File Used By Two applications
Need LOGICAl Help in C#!!