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 |
What is gui programming? : .NET Architecture
how do you hide maximize,minimize and close box at the form title bar?
How do I know when my thread pool work item has completed?
Are there any third party logging components available?
what is authentication and authorization?how do they differ?
Explain different pipelining hazards and how are they eliminated? : .NET Architecture
How will you do windows authentication and what is the namespace?
How do you handle this COM components developed in other programming languages in .NET?
0 Answers InfoAxon Technologies,
Explain about clr?
if i want to validate all the control on web page how i will do
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
what are constructors and destructors?