Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is ienumerable interface?



what is ienumerable interface?..

Answer / bipin

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

Post New Answer

More ASP.NET Interview Questions

What is Difference between Callbacks and Postback in ASP.NET?

1 Answers   Patni,


Why Web Services?

1 Answers  


What is smpte vc-1?

0 Answers  


Explain the difference between debug.write and trace.write?

0 Answers  


Explain what a diffgram is and a good use for one?

1 Answers   Siebel Systems, Syntax Softtech,


What is Forms Authentication in ASP.NET?

0 Answers  


What namespace does the Web page belong in the .NET Framework class hierarchy?

3 Answers   Siebel Systems,


Which authentication uses a combination of windows and iis authentication?

0 Answers  


Explain the differences between Server-side and Client-side code?

2 Answers  


Contrast OOP and SOA. What are tenets of each ?

0 Answers  


define silverlight and advantages ?

3 Answers   QA,


Any disadvantages in Dataset and in reflection ?

1 Answers   DELL,


Categories