<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hanaaaaaachiru</author_name>
  <author_url>https://blog.hatena.ne.jp/hanaaaaaachiru/</author_url>
  <blog_title>はなちるのマイノート</blog_title>
  <blog_url>https://www.hanachiru-blog.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>はじめに Dictionaryに要素を加える際に、Dictionary.Addとインデクサーによる要素追加で少し挙動が異なります。 Dictionary&lt;string, int&gt; dictionary = new Dictionary&lt;string, int&gt;(); // Dictionary&lt;TKey,TValue&gt;.Add(TKey, TValue) // 既存のキーを指定した場合にはエラー(System.ArgumentException)が出力される dictionary.Add(&quot;Sato&quot;, 1); // Dictionary&lt;TKey,TValue&gt;.Item[TKey] // …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.hanachiru-blog.com%2Fentry%2F2024%2F02%2F08%2F120000&quot; title=&quot;【C#】Dictionary.Addとインデクサーによる要素の追加で挙動がどう異なるか(重複するキーの場合にArgumentExceptionか上書き) - はなちるのマイノート&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>2024-02-08 12:00:00</published>
  <title>【C#】Dictionary.Addとインデクサーによる要素の追加で挙動がどう異なるか(重複するキーの場合にArgumentExceptionか上書き)</title>
  <type>rich</type>
  <url>https://www.hanachiru-blog.com/entry/2024/02/08/120000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
