what is ienumerable interface?
The IEnumerator interface provides iterative capability for
a collection that is internal to a class.
IEnumerator requires that you implement three methods:
The MoveNext method, which increments the collection
index by 1 and returns a bool that indicates whether the
end of the collection has been reached.
The Reset method, which resets the collection index to
its initial value of -1. This invalidates the enumerator.
The Current method, which returns the current object at
[position].
public bool MoveNext()
{
position++;
return (position < carlist.Length);
}
public void Reset()
{position = 0;}
public object Current
{
get { return carlist[position];}
}
IEnumerable interface
The IEnumerable interface provides support for the foreach
iteration. IEnumerable requires that you implement the
GetEnumerator method.
public IEnumerator GetEnumerator()
{
return (IEnumerator)this;
}
Is This Answer Correct ? | 1 Yes | 0 No |
Is It Possible for Static Variables access normal variable? and Normal Varialbe Access the static Variables?
1 Answers Phoenix Technologies,
In a Repeater control how one can provide an alternating color scheme ?
Any body Having SHAREPOINT Material plzzz? please material to send prasad.k12@gmail.com
To which class you load XML or Related Data
What is Partial PostBack in ASP.NET?
Write some code using interfaces, virtual methods, and an abstract class`
What is application session?
How can u debug your .net application?
code for "For every 5days system has to create 1text file with the corresponding date and it has to store in c-drive" by using web applications
Explain the differences between Server-side and Client-side code?
What is the difference between Server.Transfer and Response.Redirect? Why would you choose one over the other?
What is anonymous authentication?