Where operator comes under the category of Restriction operator. It use when we want information on based on condition. Suppose we want products that have weight more than 100gm. That for we use Where operator for filtering rows. So there are step first Create a list than use that list with Where operator:
Step 1 Create a generic list
List collection in the .NET Framework, which is located in the System.Collections.Generic namespace. We can say that Lists are dynamic array in C#. we need < and > for list declaration. Advantage of List<T> comparison ArrayList is that List<T> can grow and shrinks as the number of stored objects changes.
Illustrate with an Example
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
namespace
RestrictionOperator
{
public class
Product
{
//Variable declaration
string m_produtct =
string.Empty;
int m_unit = 0;
///
<summary>
///
Name of Product
///
</summary>
public string
ProductName
{
set { m_produtct =
value; }
get { return
m_produtct; }
}
///
<summary>
///
How many units of products
///
</summary>
public int
Unit
{
set { m_unit =
value; }
get { return
m_unit; }
}
///
<summary>
///
Constructor of Product class That contain Name and Units of a product
///
</summary>
///
<param name="ProductName"></param>
///
<param name="Unit"></param>
public Product(string
ProductName, int Unit)
{
this.ProductName = ProductName;
this.Unit = Unit;

Anil KumarPosted Jun 22, 2011, 1:54 AM
when I commented, in-between a cute picture has taken place of very cute picture of mr. Dinesh beniwal !!!! :)lol
Anil KumarPosted Jun 22, 2011, 1:51 AM
nice blogging dude...
Dinesh BeniwalPosted Jun 21, 2011, 6:25 AM
Sandeep your blogs are very useful and encourage to people to right good blogs.