<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>griefworker</author_name>
  <author_url>https://blog.hatena.ne.jp/griefworker/</author_url>
  <blog_title>present</blog_title>
  <blog_url>https://tnakamura.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>Python の文字列フォーマット操作では sql = &quot;SELECT %(name)s FROM %(table)s WHERE 10 &lt; %(code)s&quot; % \ {&quot;name&quot;:&quot;C2&quot;, &quot;table&quot;:&quot;TBL1&quot;, &quot;code&quot;:&quot;C1&quot; } という風に、名前で変換する項目を指定出来ます。この方法、どんな値に置換されるか分りやすいので便利。 C# でも Python みたいに名前で指定したい！ そう思ったので、名前埋め込み型のフォーマット操作ができるメソッドをこしらえてみました。 public static class StringUtility { // 辞書を渡す publi…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftnakamura.hatenablog.com%2Fentry%2F20110408%2Fnamed_format&quot; title=&quot;C#で名前埋め込み型の文字列フォーマット操作 - present&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>http://cdn-ak.f.st-hatena.com/images/fotolife/g/griefworker/20110407/20110407144909.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-04-08 00:00:00</published>
  <title>C#で名前埋め込み型の文字列フォーマット操作</title>
  <type>rich</type>
  <url>https://tnakamura.hatenablog.com/entry/20110408/named_format</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
