Link to home
Start Free TrialLog in
Avatar of Ricky White
Ricky WhiteFlag for United States of America

asked on

Is it Interface object or class object?

IComparer myComparer = new myReverserClass();

****************************************************************
I came across the above code at
http://msdn.microsoft.com/en-us/library/system.collections.icomparer.aspx

I don't understand what it means. I was under the impression that we cannot create an object of an interface.

Please explain what does the above line of code mean? Is myComparer an object of IComparer or myReverserClass?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
P.S.

By this, "You cannot create an instance of an interface," I mean that you cannot do:

IComparer myComparer = new IComparer();

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ricky White

ASKER

Thanks!