Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
working on Generics with IEnumerable
abdul gaffar
Dec 8 2016 12:59 AM
169
Reply
Hi all,
can any body tell me what is the error in the bellow code, i am getting the error that, you are not implemented the GetEnumerator in the IEnumerable
public class Stack<T> : IEnumerable<T>
{
T[] items;
int count=0;
public void Push(T data) { }
public void Pop() { }
public IEnumerator<T> GetEnumerator()
{
for (int i = count - 1; i <= 0; i++)
{
yield return items[i];
}
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to Pass List of data using web api in c# console app
loading supergrid controll