A Query Using the Standard Dot Notation Syntax : where : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » where »

 

A Query Using the Standard Dot Notation Syntax








    
 


using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
    public static void Main() {

        string[] names = { "A1", "B123", "C123123", "E", "W" };

        IEnumerable<string> sequence = names
         .Where(n => n.Length < 6)
         .Select(n => n);

        foreach (string name in sequence) {
            Console.WriteLine("{0}", name);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» where