<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>u_osusi</author_name>
  <author_url>https://blog.hatena.ne.jp/u_osusi/</author_url>
  <blog_title>ノートの端の書き残し</blog_title>
  <blog_url>https://nigiri.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>MyClassというクラスがあったとします。 普通、MyClassのインスタンスを生成したければこうです。 MyClass instance = new MyClass(); さて、C#は型がガッチリ決まっているのが素晴らしいところだとは思うのですが、それが困るケースもやはりあります。 他の言語で作ったJsonからデシリアライズしたいとか、実行時に生成したい型が初めてわかる、みたいなことはよくありますね。 作りたいインスタンスの型とそこに入れるJsonを両方文字列で指定できたらとても便利です。 そういった動的に変化する型に対応する際に使えるのがリフレクションです。 文字列からインスタンスを生成…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnigiri.hatenablog.com%2Fentry%2F2019%2F06%2F08%2F002408&quot; title=&quot;【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>2019-06-08 00:24:08</published>
  <title>【C#】【リフレクション】任意の型のインスタンスを文字列から生成する</title>
  <type>rich</type>
  <url>https://nigiri.hatenablog.com/entry/2019/06/08/002408</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
