Transformation : select : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » select »

 

Transformation








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

public class MainClass {
    public static void Main() {

        int[] numbers = { 5, 4, 1};
        string[] strings = { "zero", "one", "two"};

        var textNums =
            from n in numbers
            select strings[n];

        Console.WriteLine("Number strings:");
        foreach (var s in textNums) {
            Console.WriteLine(s);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» select