prints strings where each element has the second letter 'i'. : where : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » where »

 

prints strings where each element has the second letter 'i'.








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

public class MainClass {
    public static void Main() {

        string[] digits = { "ziro", "one", "two", "three"};

        var reversedIDigits = (
            from d in digits
            where d[1] == 'i'
            select d)
            .Reverse();
        foreach (var d in reversedIDigits) {
            Console.WriteLine(d);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» where