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
Karcki Ramani
NA
12
2.2k
Dynamic polymorphism
Feb 1 2016 6:08 AM
I have the following program and my need is call the parent class method using parent class reference which points to child class object.
class aa
{
public virtual void test()
{
Console.WriteLine("test in parent class");
}
}
class chi:aa
{
public override void test()
{
Console.WriteLine("test in child class");
}
}
class Program:chi
{
static void Main(string[] args)
{
aa ref1 =new chi();
ref1.test();
}
}
}
I need to class the test method of class "aa" using the reference ref1. how to do this?
Please help
Reply
Answers (
1
)
print several dgv in single page
C#.net excel