Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linq Question
Message
General information
Forum:
ASP.NET
Category:
LINQ
Title:
Linq Question
Miscellaneous
Thread ID:
01472512
Message ID:
01472512
Views:
125
Consider this example:
public static void Example1()
{
    
    List<string> people = new List<string>() 
    { 
        "Granville", "John", "Ross", "Betty", 
        "Chandler", "Rachel", "Monica", "Ruby" 
    };


    //IEnumerable<string> query = from p in people
    //                            where p.StartsWith("R")
    //                            orderby p
    //                            select p;

    var query = (from p in people
                    where p.StartsWith("R")
                    orderby p
                    select p).ToList();

            
    foreach (string person in query)
    {
        Console.WriteLine(person);
    }
    Console.WriteLine("Press any key to continue");
    Console.ReadLine();
}
What is the difference between the commented query and the uncommented query?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform