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

What is gui programming? : .NET Architecture

0 Answers  


how do you hide maximize,minimize and close box at the form title bar?

1 Answers   Six Sigma,


How do I know when my thread pool work item has completed?

0 Answers  


Are there any third party logging components available?

0 Answers  


what is authentication and authorization?how do they differ?

5 Answers   Six Sigma,


Explain different pipelining hazards and how are they eliminated? : .NET Architecture

0 Answers  


How will you do windows authentication and what is the namespace?

0 Answers  


How do you handle this COM components developed in other programming languages in .NET?

0 Answers   InfoAxon Technologies,


Explain about clr?

0 Answers  


if i want to validate all the control on web page how i will do

2 Answers   PCS,


IS IT Possible to inherit the AJAX page from child class which(child) is inherit from page class.Because i should apply some security in child class

0 Answers   IBM,


what are constructors and destructors?

0 Answers   Six Sigma,


Categories