Querying string Array
namespace : System.Linq
string[] productList = {"Shoe","Bag","Pen","Pencil","Book"};
var products = from p in productList where p.StartsWith("Pen") select p;
foreach (var product in products)
{
Response.Write("
" + product);
}
Newer Post
Older Post
Home