<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>suusanex</author_name>
  <author_url>https://blog.hatena.ne.jp/suusanex/</author_url>
  <blog_title>新しもの好きプログラマの耳より情報ブログ</blog_title>
  <blog_url>https://suusanex.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>C#で、関数の戻り値やout引数が不要なので捨てたいという場合がある。 今まではnotUseのような適当な名前でダミーの変数を宣言していたが、C# 7.0からはもっと良い書き方が登場していた。 _（アンダーバー）を書けばよい。 これなら型指定もいらないし、書きやすいだけでなく実際にメモリ確保処理がスキップされるのでパフォーマンスにも良いようだ。 async関数の完了を待たない事を明示するためにとりあえず変数で受ける場合にも、これは有効だと思う。 最近のC#はこういう「知らなくても動くコードを書く上では困らないが、知っているとパフォーマンスが上がったりコードが読みやすくなって便利」という改善が多…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsuusanex.hatenablog.jp%2Fentry%2F2019%2F09%2F16%2F162001&quot; title=&quot;C#で不要な戻り値やout引数を捨てるには_（アンダーバー）を使ったほうが良い - 新しもの好きプログラマの耳より情報ブログ&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-09-16 16:20:01</published>
  <title>C#で不要な戻り値やout引数を捨てるには_（アンダーバー）を使ったほうが良い</title>
  <type>rich</type>
  <url>https://suusanex.hatenablog.jp/entry/2019/09/16/162001</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
