.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> LINQ >> Post New QuestionBookmark and Share Subscribe to Forum

How to use LINQ in C#.Net

Posted By: Narayanan     Posted Date: April 16, 2012    Points:5   Category :LINQ
I am new for LINQ Code.I am using following code in my Project.

I have a class file that is called "Student.cs".
List<Student> student = new List<Student>
new Student {StudentNo ="001" ,StudentName="ANAND" , age=10, Sex="MALE"},
new Student {StudentNo ="002" ,StudentName="BHAVANA" , age=10, Sex="FEMALE"},
new Student {StudentNo ="003" ,StudentName="CHANDRAN" , age=10, Sex="MALE"},
new Student {StudentNo ="004" ,StudentName="DINESH" , age=10, Sex="MALE"},
new Student {StudentNo ="005" ,StudentName="FATHIMA" , age=10, Sex="FEMALE"}
Student p = new Student();
p.age = 10; p.Sex = "male";
p.StudentName = "Hammad Ali";
p.StudentNo = "006";

how can i fetch the data from this code into datagrid view ?
Note: fetch the data via LINQ .

Author: Syed Shakeer Hussain             
Posted Date: May 15, 2012     Points: 20   

Try with the below line of code


Author: Sreeraj Nair Mungath             
Posted Date: July 05, 2012     Points: 20   

DataGrid.DataSource=Student; is not linq
go to msdn

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend