<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>omdwn</author_name>
  <author_url>https://blog.hatena.ne.jp/omdwn/</author_url>
  <blog_title>インドカレーファンクラブ</blog_title>
  <blog_url>https://omdwn.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>抽象的な書き方だけど例えばenum AnimalのAnimal.Dogから名称&quot;イヌ&quot;だとか鳴き声&quot;わんわん&quot;を得るだとか、そういうことをする よくある書き方としては2パターンあると思う 属性を使う 拡張メソッドを使う どっちかというと前者の方が綺麗だけど、値の取得に複雑な処理が介在するなら後者の方がいいかなと思う ググれば出てくる気がする話だけど自分用にメモ 属性を使う こんな感じ Reflectionを使うのでちょっと複雑 public enum Animal { [Name(&quot;イヌ&quot;)] Dog, [Name(&quot;ネコ&quot;)] Cat, Giraffe, } // AllowMultiple…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fomdwn.hatenablog.com%2Fentry%2F2020%2F05%2F17%2F020116&quot; title=&quot;【C#】Enumの列挙子から情報を得る - インドカレーファンクラブ&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-05-17 02:01:16</published>
  <title>【C#】Enumの列挙子から情報を得る</title>
  <type>rich</type>
  <url>https://omdwn.hatenablog.com/entry/2020/05/17/020116</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
