Linq Projection in C#

In this tutorial we will look at LINQ Projection, which is{
when we can select specific data from a source_name = value;
without retrieving all fields. We will be creating a class}
to define a list in which we will create a number of}public string City
people with IDs, names and cities. Then we will use{get
buttons to select only parts of this data.{return _city;
First, we will start off by creating a new Windows}set
Form application in VS.NET 2008. Next, we will create{
a class - call it aList - and define our list object:using_city = value;
System;using System.Collections.Generic;using}
System.Linq;using System.Text;namespace}
LINQProjection_cs}
{class aList}
{private int _personID;private string _name;privateThis class defines a Property for each field we want,
string _city;public int PersonIDand its data type.
{getNext, we can add our Controls to the Form. We will
{return _personID;add three buttons, and a Rich TextBox. The buttons
}setwill retrieve all of the IDs, Names and Cities, individually.
{This will demonstrates how we can retrieve the
_personID = value;specific data that we want. Once we have our
}controls, we can move onto the code-behind of the
}public string Nameform and define our data. We will add a few sample
{getentries:
{return _name;Please vist to complete this article. Happy coding!
}set