Use Of Linq Any Operator With An String Array

  1. using System;  
  2. using System.Linq;  
  3. using System.Collections;  
  4. using System.Collections.Generic;  
  5.   
  6. public class MainClass {  
  7.     public static void Main() {  
  8.         string[] presidents = {"C""S""H""A""P""corner.com"};  
  9.   
  10.         bool any = presidents.Any();  
  11.         Console.WriteLine(any);  
  12.     }  
  13. }