<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fumokmm</author_name>
  <author_url>https://blog.hatena.ne.jp/fumokmm/</author_url>
  <blog_title>No Programming, No Life</blog_title>
  <blog_url>https://npnl.hatenablog.jp/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>文法</anon>
  </categories>
  <description>null 許容型は、System.Nullable 構造体のインスタンスらしい。 C#では型に ? をつけるとNullを許容するようにできる。 int? i = null; // nullが入れられるint型 ??演算子 ??演算子を使うと、型がnullでなかった場合は左辺、nullだったら右辺になる。 int y = x ?? -1; // xがnullでないならx, nullなら-1Null許容型がnullだった場合の初期値を設定するみたいな意味合いらしい。 Groovyのエルビス演算子*1みたいな感じですね。 HasValueプロパティとValueプロパティ HasValueで値がnul…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnpnl.hatenablog.jp%2Fentry%2Fcsharp-nullable&quot; title=&quot;C#のNull許容型(Nullable)について - No Programming, No Life&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-10-28 22:34:50</published>
  <title>C#のNull許容型(Nullable)について</title>
  <type>rich</type>
  <url>https://npnl.hatenablog.jp/entry/csharp-nullable</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
