dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersDevaraj T N
Phagu Mahato
Priya jain
srirama
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » LINQ »

Having doubt in Linq concept


Posted Date: 07 Mar 2012      Posted By:: Lawrence     Member Level: Gold    Member Rank: 317     Points: 1   Responses: 1



Hi Everyone,
Can i use linq in C# asp.net. If it's use tell some example program. I got some through net, but it's not working.




Responses

#661893    Author: chirag      Member Level: Silver      Member Rank: 1032     Date: 13/Mar/2012   Rating: 2 out of 52 out of 5     Points: 4

Yes you can use linq in c# asp.net. Following is the simple example of Linq.

if you want find "eng" string in languages then following is the example.

string[] languages = { "english", "gujrati","hindi","marathi"};
var language = from lg in languages
where lg.Contains("eng")
select lg;

Above i have used string of Array. you can you any collection which implement IEnumrable Interface like collection,list, or even you can fetch languages from database also but syntax remain same.



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Linq in asp.net c# sample program
Previous : Having doubt in Linq concept
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.