use Linq Cast to convert array to IEnumerable : Cast : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » Cast »

 

use Linq Cast to convert array to IEnumerable








    
 
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;

public class MainClass{
   public static void Main(){
            object[] doubles = {1.0, 2.0, 3.0};
            IEnumerable<double> d = doubles.Cast<double>();
            Console.Write(d);
   }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» Cast