Last active
September 22, 2017 21:55
-
-
Save ugurhasar/0d66cf4bca88816a7c1af9bd85e5052d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C# Linq ile Dizi İçinde Duplicate Satırları Silme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fooArray.GroupBy(x => x.Id).Select(x => x.First()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var intArray = new[] { 2000, 2011, 2011, 2012, 2009, 2009, 2000 }; | |
var uniqueArray = intArray.Distinct().ToArray(); | |
//or | |
uniqueArray = intArray.GroupBy(i => i).Select(grp => grp.Key).ToArray(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment