<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nakamurakko</author_name>
  <author_url>https://blog.hatena.ne.jp/nakamurakko/</author_url>
  <blog_title>nakamurakko’s blog</blog_title>
  <blog_url>https://nakamurakko.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>環境 Visual Studio 2022 .NET 6.0 C# nameof 、便利ですね。 Console.WriteLine(nameof(System.Threading.Tasks.Task)); と書くと、 Task と、クラス名が文字列として出力される。 クラス名に限らず変数なども文字列として出力されるけど、こんな書き方も出来た。 class MailSetting { public const string HOST_NAME = nameof(HOST_NAME); } キー値として使う定数文字列は、 HOST_NAME = &quot;HOST_NAME&quot; のように 定数 = 定数…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnakamurakko.com%2Fentry%2F2021%2F12%2F22%2F144710&quot; title=&quot;nameof で文字列定数を設定する - nakamurakko’s blog&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>2021-12-22 14:47:10</published>
  <title>nameof で文字列定数を設定する</title>
  <type>rich</type>
  <url>https://nakamurakko.com/entry/2021/12/22/144710</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
