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
Guest User
Tech Writer
32
7k
Interfaces
Mar 28 2015 8:43 AM
Hi, I have an Interface and I have a Class:
namespace
Demo
{
public interface
IAB
{
void
Greet();
}
public class
AB
{
public void
Hello(
IAB
e )
{
e.Greet();
}
}
}
___________________________________________________________________________________
The problem is how do I implement the interface
IAB
as a parameter when I call the method
Hello
:
AB
ab = new
AB
();
ab.Hello(
how do I implement the interface inside here?
) ;
I know how to do it in Java using anonymous classes or lambda expression.
How can I do it in C#.
PLEASE HELP .......
Reply
Answers (
5
)
email existance check code it showing error?
Loop, Validation, Environment NewLine and Switch Case