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

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Linq query to get the distinct values in a string array

Posted By: Deco     Posted Date: January 20, 2012    Points:5   Category :C#
Please get me the C# code with Linq to get the distinct values in a string array

Author: Syed Shakeer Hussain             
Posted Date: January 23, 2012     Points: 20   

Use the below code to get Distinct Values from String Array
           String [] strdata={"Shakeer","Shakeer","Hussain"};

IEnumerable<string> Strquery = strdata.Distinct();

foreach (string s in Strquery)

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