<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Tsuto</author_name>
  <author_url>https://blog.hatena.ne.jp/Tsuto/</author_url>
  <blog_title>果てしないたわごと</blog_title>
  <blog_url>https://tsuto.hatenadiary.org/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>随分前に同じプロジェクトで文字列比較の結果がおかしいと相談された。 簡略化すると下記のようになる。 int i; string s; // 省略 if(i.Equals(s)) { // 処理 } こうして見ると原因はintとstringを比較しているからだとわかるが、IDEは特にコンパイルエラーを出さないので気がつきにくい。 ==演算子での比較の場合はコンパイルエラーになる。 リファレンスにはこのように記載されている。 [引用] Int32.Equals メソッド (Object) パラメータ obj このインスタンスと比較するオブジェクト。 戻り値 obj が Int32 のインスタンスで…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftsuto.hatenadiary.org%2Fentry%2F20061218%2F1166419532&quot; title=&quot;Equalsメソッドと==演算子 in C# - 果てしないたわごと&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>2006-12-18 14:25:32</published>
  <title>Equalsメソッドと==演算子 in C#</title>
  <type>rich</type>
  <url>https://tsuto.hatenadiary.org/entry/20061218/1166419532</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
