{"height":"190","description":"// \u524d\u63d0\u3001 C#-7.0 using System.Windows.Controls; var c = new Control(); if ( c is Label l ) Console.WriteLine( $\"Label.Content={l.Content}\" ); if ( c is TextBlock t ) // <--\u3053\u3053\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u304c\u751f\u3058\u3066\u304f\u308c\u308b\u3002 Console.WriteLine( $\"TextBlock.Text={t.Text}\" ); c is TextBlock t \u306b\u5bfe\u3057 error CS0584: Internal compiler error: co\u2026","categories":["\u601d\u3044\u8fbc\u307f","\u3053\u308f\u3044","Control","UIElement","C#","WPF","XAML","ItemsControl","null","TextBlock","Label"],"provider_name":"Hatena Blog","provider_url":"https://hatena.blog","version":"1.0","title":"C#, WPF, XAML: System.Windows.Controls.Control \u304c \"\u3044\u308f\u3086\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\" \u306e\u5171\u901a\u57fa\u5e95\u3060\u3068\u601d\u3044\u8fbc\u3093\u3067\u5b9f\u88c5\u3057\u305f\u3089 TextBlock \u3067\u3042\u3063\u3055\u308a null \u4f8b\u5916\u306b\u6bba\u3055\u308c\u305f\u4ef6","author_url":"https://blog.hatena.ne.jp/USAGI-WRP/","author_name":"USAGI-WRP","published":"2018-12-26 03:24:30","width":"100%","blog_title":"C++ \u3068\u304d\u3069\u304d \u3054\u306f\u3093\u3001\u308f\u308a\u3068\u3066\u3043\u30fc\u3076\u308c\u3044\u304f\u2606","url":"https://usagi.hatenablog.jp/entry/2018/12/26/032430","blog_url":"https://usagi.hatenablog.jp/","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/U/USAGI-WRP/20181226/20181226034125.png","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fusagi.hatenablog.jp%2Fentry%2F2018%2F12%2F26%2F032430\" title=\"C#, WPF, XAML: System.Windows.Controls.Control \u304c &quot;\u3044\u308f\u3086\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb&quot; \u306e\u5171\u901a\u57fa\u5e95\u3060\u3068\u601d\u3044\u8fbc\u3093\u3067\u5b9f\u88c5\u3057\u305f\u3089 TextBlock \u3067\u3042\u3063\u3055\u308a null \u4f8b\u5916\u306b\u6bba\u3055\u308c\u305f\u4ef6 - C++ \u3068\u304d\u3069\u304d \u3054\u306f\u3093\u3001\u308f\u308a\u3068\u3066\u3043\u30fc\u3076\u308c\u3044\u304f\u2606\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}