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

How to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile

0 Answers  


how to make and display a form without title bar?

0 Answers   Six Sigma,


Define an interrupt? : Dot net architecture

0 Answers  


What are .net mobile controls features? : Microsoft dot net mobile

0 Answers  


Which tool you will use to deploy a windows service

1 Answers   Fulcrum Logic,


any one can explain about projectarchitecture and project approach briefly

0 Answers  


Whate are resource files? How are they used in .net?

0 Answers  


data types used in validation control

0 Answers   PCS,


What re interop services?

0 Answers  


What is gui programming? : .NET Architecture

0 Answers  


Explain about generation?

0 Answers  


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

0 Answers  


Categories