Use Linq OfType to get value of specific type : OfType : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » OfType »

 

Use Linq OfType to get value of specific type








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

public class MainClass{
   public static void Main(){
            object[] sequence = {1, "Hello", 2.0};
            Console.Write(sequence.OfType<double>());
   }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» OfType