I have searched through internet that can we create instance of Interface or not , the answer that I receive is no.
Reference Link:
https://www.google.co.in/search?q=can+we+create+object+of+interface+in+c%23&oq=can+we+create+object+of+interface&aqs=chrome.2.69i57j0l5.10169j0j7&sourceid=chrome&ie=UTF-8
Then I find one article on C-sharpCorner site which comprises lines of code like below:
IEnumerable iEnumerableOfString = (IEnumerable)Month;
IEnumerator iEnumeratorOfString = Month.GetEnumerator();
Reference Link :
https://www.c-sharpcorner.com/UploadFile/219d4d/ienumerable-vs-ienumerator-in-C-Sharp/
Question: As per my knowledge, IEnumerable and IEumerator both are interfaces then how are we able to create instances of both mentioned in the above article?
Guest UserPosted Aug 29, 2018, 8:56 AM