1
Answer

Interface

Ask a question
Hashmat Ali

Hashmat Ali

16y
2.6k
1

Hi

I would like to know wheather interfaces can be instantiated or not.I know interface definition can not have any constructor.so they can't be instantiated.

but i see many places where the syntax seems like they are instantiating the interface.

e.g:

IEnumerator e =names.GetEnumerator();

Note that the GetEnumerator() method returns an enumerator object each time it is called.

so what is this "e"? plz clarify this one line of code.

thanx

 


Answers (1)