Last active
September 22, 2017 21:55
This file contains hidden or 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 hidden or 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 hidden or 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