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 |
Define cache coherency and how is it eliminated? : Dot net architecture
Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component
What is the purpose of cache? : Dot net architecture
Explain domestic architecture artifacts? : .NET Architecture
what is the difference between master page and content page?
Define the mesi? : Dot net architecture
what is stage management ? (ASP.NET)
What is static Constructor?
Define an interrupt? : Dot net architecture
How can I write my own .NET host?
how would you manage data if u were not to use sessions or cookies ?
There are so many languages are already existing for developing application.Then what is the need of .net.