Partitioning Operators : Take : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » Take »

 

Partitioning Operators








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

public class MainClass {
    public static void Main() {

        int[] numbers = { 5, 4, 1, 3, 9};

        var first3Numbers = numbers.Take(3);

        Console.WriteLine("First 3 numbers:");
        foreach (var n in first3Numbers) {
            Console.WriteLine(n);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» Take