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 |
How to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile
how to make and display a form without title bar?
Define an interrupt? : Dot net architecture
What are .net mobile controls features? : Microsoft dot net mobile
Which tool you will use to deploy a windows service
any one can explain about projectarchitecture and project approach briefly
Whate are resource files? How are they used in .net?
data types used in validation control
What re interop services?
What is gui programming? : .NET Architecture
Explain about generation?
What is cache coherency and how is it eliminated? : Dot net architecture