<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>wata_d</author_name>
  <author_url>https://blog.hatena.ne.jp/wata_d/</author_url>
  <blog_title>閑古鳥</blog_title>
  <blog_url>https://www.little-cuckoo.jp/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>配列やらリストから重複を除いて一意な値を取り出したいということはよくありますが、LINQではEnumerable.Distinctメソッドを利用すると一発で実現できるようです。MSDNのサンプルそのままですが: int[] arr = {21, 46, 46, 55, 17, 21, 55, 55}; var uniq = arr.Distinct(); // 重複を取り除く foreach (var i in uniq) { Console.WriteLine(i); } /* 出力結果: 21 46 55 17 */ 見ての通りシーケンスをあらかじめソートしておく必要はありません。便利です…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.little-cuckoo.jp%2Fentry%2F20110310%2F1299713979&quot; title=&quot;シーケンスから重複した要素を取り除くには(Unique) - 閑古鳥&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-03-10 08:39:39</published>
  <title>シーケンスから重複した要素を取り除くには(Unique)</title>
  <type>rich</type>
  <url>https://www.little-cuckoo.jp/entry/20110310/1299713979</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
