Enumerable From Array - CSharp System

CSharp examples for System:Array Enumerate

Description

Enumerable From Array

Demo Code


using System.Collections.Generic;
using System.Collections;
using System;/*from w w w .  ja va  2s .com*/

public class Main{
        public static IEnumerable<T> EnumerableFromArray<T>(T[] array)
        {
            foreach (T t in array)
                yield return t;
        }
}

Related Tutorials