<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bamch0h</author_name>
  <author_url>https://blog.hatena.ne.jp/bamch0h/</author_url>
  <blog_title>bamchoh’s diary</blog_title>
  <blog_url>https://bamch0h.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>ただの愚痴です。 なんしか、↓これがコンパイル通るのに実行時にキャストエラーになるのが納得いかない。 using System; using System.Collections.Generic; namespace GenericTest { class Program { private static void Fn1(object list) { foreach (var i in (IList&lt;int&gt;)list) // ここでキャストエラー { Console.WriteLine(i); } } private static object Fn2(List&lt;int&gt; list1) {…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbamch0h.hatenablog.com%2Fentry%2F2020%2F03%2F20%2F015216&quot; title=&quot; ジェネリックのキャスト - bamchoh’s diary&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>2020-03-20 01:52:16</published>
  <title> ジェネリックのキャスト</title>
  <type>rich</type>
  <url>https://bamch0h.hatenablog.com/entry/2020/03/20/015216</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
