<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Takachan</author_name>
  <author_url>https://blog.hatena.ne.jp/Takachan/</author_url>
  <blog_title>PG日誌</blog_title>
  <blog_url>https://takap-tech.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>コード書けばすぐわかる事なんですが is 演算子の挙動の話です。is 演算子は複数の型で true になる可能性があります。 親子関係がある型で厳密に型を判定したい場合、GetType() と typeof を使います。 // こんなクラスがあったとして、、 public class BaseClass { } public class DerivedClass_1 : BaseClass { } public class DerivedClass_2 : BaseClass { } // こんなコードを書いたとすると結果がコメントのようになります static void Main(strin…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2016%2F08%2F10%2F164041&quot; title=&quot;C# の is 演算子と typeof の型判定の挙動の違い - PG日誌&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>https://cdn-ak.f.st-hatena.com/images/fotolife/T/Takachan/20170114/20170114224940.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-08-10 16:40:41</published>
  <title>C# の is 演算子と typeof の型判定の挙動の違い</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2016/08/10/164041</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
