J
JasonX
Hi,
Im just going through my old exam papers, and have come by a question
that asks to explain how you would use a variable of type IMyInterface
for example given this interface
interface IMyInterface
{
string DoWork();
}
and this class that inherits off it:
class MyClass : IMyInterface
{
....
How would you use a variable of type IMyInterface?
i.e IMyInterface imf = ...?
I dont see what possible use imf would have or how i would use it? Or
could the question simply mean you would use a variable of type
IMyInterface by going "class MyClass : IMyInterface"?
Thanks for any help,
Jason
Im just going through my old exam papers, and have come by a question
that asks to explain how you would use a variable of type IMyInterface
for example given this interface
interface IMyInterface
{
string DoWork();
}
and this class that inherits off it:
class MyClass : IMyInterface
{
....
How would you use a variable of type IMyInterface?
i.e IMyInterface imf = ...?
I dont see what possible use imf would have or how i would use it? Or
could the question simply mean you would use a variable of type
IMyInterface by going "class MyClass : IMyInterface"?
Thanks for any help,
Jason