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
Chintan Dave
NA
67
37.3k
Instance of Interface in C#
Aug 29 2018 4:34 AM
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<string> iEnumerableOfString = (IEnumerable<string>)Month;
IEnumerator<string> 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?
Reply
Answers (
1
)
Unable to resolve 'System.Net.Http (>= 4.3.1)'
I Want Popup For Geoserver Polygon Layer In My Aspx.Page