<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>USAGI-WRP</author_name>
  <author_url>https://blog.hatena.ne.jp/USAGI-WRP/</author_url>
  <blog_title>C++ ときどき ごはん、わりとてぃーぶれいく☆</blog_title>
  <blog_url>https://usagi.hatenablog.jp/</blog_url>
  <categories>
    <anon>思い込み</anon>
    <anon>こわい</anon>
    <anon>Control</anon>
    <anon>UIElement</anon>
    <anon>C#</anon>
    <anon>WPF</anon>
    <anon>XAML</anon>
    <anon>ItemsControl</anon>
    <anon>null</anon>
    <anon>TextBlock</anon>
    <anon>Label</anon>
  </categories>
  <description>// 前提、 C#-7.0 using System.Windows.Controls; var c = new Control(); if ( c is Label l ) Console.WriteLine( $&quot;Label.Content={l.Content}&quot; ); if ( c is TextBlock t ) // &lt;--ここでコンパイルエラーが生じてくれる。 Console.WriteLine( $&quot;TextBlock.Text={t.Text}&quot; ); c is TextBlock t に対し error CS0584: Internal compiler error: co…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fusagi.hatenablog.jp%2Fentry%2F2018%2F12%2F26%2F032430&quot; title=&quot;C#, WPF, XAML: System.Windows.Controls.Control が &amp;quot;いわゆるコントロール&amp;quot; の共通基底だと思い込んで実装したら TextBlock であっさり null 例外に殺された件 - 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>https://cdn-ak.f.st-hatena.com/images/fotolife/U/USAGI-WRP/20181226/20181226034125.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-12-26 03:24:30</published>
  <title>C#, WPF, XAML: System.Windows.Controls.Control が &quot;いわゆるコントロール&quot; の共通基底だと思い込んで実装したら TextBlock であっさり null 例外に殺された件</title>
  <type>rich</type>
  <url>https://usagi.hatenablog.jp/entry/2018/12/26/032430</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
