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
Sharad Gupta
98
19.7k
8.6m
Method Hiding in c#
Jan 17 2015 2:05 AM
I have a program like
class A
{
public void Foo() {
Console.WriteLine("Foo A");
}
}
class B : A
{
public virtual new void Foo() { Console.WriteLine("Foo B"); }
}
class C : B
{
public new void Foo() { Console.WriteLine("Foo "); }----------(1 type)
// or
new void Foo() { Console.WriteLine("Foo"); }----(2 type)
}
class Test:C
{
static void Main(string[] args)
{
C obj = new C();
obj.Foo();
Console.ReadKey();
}
}
when i execute this with type(1) ,the output is "foo" ,but when i execute this with type (2) then the output is "foo B" , what is difference b/w type1 and type2 in c class.
Reply
Answers (
1
)
summation in datagridview
or "||" operator problems ?