Concatenation Operator Example in C# LINQ

public List CustomerList; StringBuilder sbResult = new StringBuilder(); var <div><a href="http://cialis-topstorerx.com/">online pharmacy australia cialis</a> -- <a href="http://canadianpharmacyonline-rx.com/" rel="nofollow">ac&amp;c canada pharmacy</a> -- <a href="http://sildenafilviagra-rxstore.com/">http://sildenafilviagra-rxstore.com/</a> -- <a href="http://viagra-bestrxonline.com/" rel="nofollow">bad side effects of viagra</a> -- <a href="http://tadalafilcialis-storerx.com/">http://tadalafilcialis-storerx.com/</a></div>  Query12 = CustomerList.Where(c =&gt; c.Country == "USA") .Concat(CustomerList.Where(c =&gt; c.Country == "Canada") .Concat(CustomerList.Where(c =&gt; c.Country == "Mexico"))); Query12 = (from c in CustomerList where c.Country == "USA" select c) .Concat((from c in CustomerList where c.Country == "Canada" select c) .Concat((from c in CustomerList where c.Country == "Mexico" select c))); foreach (var c in Query12) sbResult.Append(String.Format("CustID = {0}, Name = {1}, Country = {2}\r\n", c.CustomerID, c.CompanyName, c.Country));

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.