<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinriyo</author_name>
  <author_url>https://blog.hatena.ne.jp/shinriyo/</author_url>
  <blog_title>万年素人からHackerへの道</blog_title>
  <blog_url>https://shinriyo.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>今までJavaScriptで「xがnullでなければxをそのまま、そうでなければ、y」というのを以下の三項演算子でやってた。 ※Rubyではもっと短くかけた気がする。 hoge = x ? x : y でも、先程のxが以下のように式が長い時が凄い冗長。 同じ式を２度も書くのは嫌。DRYしたい。 hoge = hoge+bar*foo ? hoge+bar*foo : y 変数×に入れてやろうと思ったが、これはできない hoge = (x=hoge+bar*foo) ? x : y C#にはnull合体演算子でこんな書き方ができる。 hoge = x ?? yだから先程のうざい式もこんな風にでき…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinriyo.hateblo.jp%2Fentry%2F20110609%2Fp2&quot; title=&quot; null合体演算子（ぬるがったいえんざんし、null coalescing operator）C# - 万年素人からHackerへの道&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>2011-06-09 00:00:01</published>
  <title> null合体演算子（ぬるがったいえんざんし、null coalescing operator）C#</title>
  <type>rich</type>
  <url>https://shinriyo.hateblo.jp/entry/20110609/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
