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
Adarsh Achar
NA
4
713
Difference between method hiding and method overriding
May 21 2016 6:07 AM
using System;
namespace MethodOverridre
{
class VTU
{
public virtual void Admission()
{
Console.WriteLine("This is VTU Admission");
}
public virtual void Rules()
{
Console.WriteLine("This is VTU Rules");
}
public virtual void Certificate()
{
Console.WriteLine("This is VTU Certificate");
}
public virtual void Exam()
{
Console.WriteLine("This is VTU Exam");
}
public virtual void Marks()
{
Console.WriteLine("This is VTU Marks");
}
}
class Autonomous : VTU
{
public override void Exam()
{
Console.WriteLine("This is Autonomous Exam");
}
public override void Marks()
{
Console.WriteLine("This is Autonomous Marks");
}
}
class Program
{
static void Main(string[] args)
{
VTU vt = new Autonomous();
vt.Admission();
vt.Rules();
vt.Certificate();
vt.Marks();
Console.ReadKey();
}
}
}
In the above code is there any specific reason to get reference of base class while creating a child class object? Any how child class will inherits all the methods of base class.
Reply
Answers (
1
)
Compute Subtotal of POS
How to increase time out of entity framework from config