Assign the loop variable to another variable declared inside the statement block : where : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » where »

 

Assign the loop variable to another variable declared inside the statement block








    
 

using System;
using System.Collections.Generic;
using System.Linq;
public class MainClass {
    public static void Main() {
        IEnumerable<char> vowels = "aeiou";
        IEnumerator<char> rator = vowels.GetEnumerator();
        IEnumerable<char> query = "Not what you might expect";


        foreach (char vowel in "aeiou") {

            char temp = vowel;
            query = query.Where(c => c != temp);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» where