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



What is Ienumerable..

Answer / wasim akhtar

The IEnumerable interface appears throughout C# programs. It specifies that the underlying type implements the GetEnumerator method. It enables the foreach-loop to be used.
Program that uses IEnumerable<T> [C#]

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
static void Main()
{
IEnumerable<int> result = from value in Enumerable.Range(0, 2)
select value;

// Loop.
foreach (int value in result)
{
Console.WriteLine(value);
}

// We can use extension methods on IEnumerable<int>
double average = result.Average();

// Extension methods can convert IEnumerable<int>
List<int> list = result.ToList();
int[] array = result.ToArray();
}
}

Output

0
1

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net AllOther Interview Questions

Define cache coherency and how is it eliminated? : Dot net architecture

0 Answers  


Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component

2 Answers  


What is the purpose of cache? : Dot net architecture

0 Answers  


Explain domestic architecture artifacts? : .NET Architecture

0 Answers  


what is the difference between master page and content page?

0 Answers   Six Sigma,


Define the mesi? : Dot net architecture

0 Answers  


what is stage management ? (ASP.NET)

5 Answers   Ness Technologies,


What is static Constructor?

4 Answers   iGate,


Define an interrupt? : Dot net architecture

0 Answers  


How can I write my own .NET host?

0 Answers   HCL,


how would you manage data if u were not to use sessions or cookies ?

2 Answers   Ness Technologies,


There are so many languages are already existing for developing application.Then what is the need of .net.

1 Answers  


Categories