top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Give an Example of Chaining LINQ Query Operators in C#?

0 votes
35 views
Give an Example of Chaining LINQ Query Operators in C#?
posted May 11, 2016 by Jayshree

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
using System;

using System.Collections.Generic;

using System.Data;

using System.Linq;

namespace AbundantCode

{

internal class Program

{

//Collection Initialization Example in C#

private static void Main(string[] args)

{

List<string> ABundantCodeVersions = new List<string> { "Abundantcodev1", "Abundantcodev2", "Abundantcode3" };

var query = ABundantCodeVersions.Where(a => a.Contains("v"))

.OrderByDescending(a => a.Length)

.Select(a => a.ToLower());

foreach (string versions in query)

{

Console.WriteLine(versions);

}

Console.ReadLine();

}

}

}
answer May 11, 2016 by Shivaranjini
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...