Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Overloading
Akkiraju Ivaturi
12y
1k
1
Reply
What is displayed, and why?
using
System;
class
Base
{
public
virtual
void
Foo(
int
x)
{
Console.WriteLine (
"Base.Foo(int)"
);
}
}
class
Derived : Base
{
public
override
void
Foo(
int
x)
{
Console.WriteLine (
"Derived.Foo(int)"
);
}
public
void
Foo(
object
o)
{
Console.WriteLine (
"Derived.Foo(object)"
);
}
}
class
Test
{
static
void
Main()
{
Derived d =
new
Derived();
int
i = 10;
d.Foo(i);
}
}
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
any body having IABC source code ..
What will be displayed, why, and how confident are you?