<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kentem_dev_mukaida</author_name>
  <author_url>https://blog.hatena.ne.jp/kentem_dev_mukaida/</author_url>
  <blog_title>KENTEM TechBlog</blog_title>
  <blog_url>https://tech.kentem.jp/</blog_url>
  <categories>
    <anon>言語</anon>
    <anon>学習</anon>
  </categories>
  <description>こんにちは。皆さんはC#においてis演算子をどのくらい使っていますか？ 入門時には変数の中身の型チェックに使う方法を習ったと思いますが、実はとっても便利な使い方があるんです。 今回は is 演算子の便利な使い方をいくつかご紹介します。 型チェックと代入 null チェック null チェックと代入 論理パターン リストパターン まとめ おわりに 型チェックと代入 object? obj = GetValue(); if (obj is string str) { } obj is string の横に変数名を書くと型チェックの結果が true なら変数に値の代入を行ってくれます。 null チ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.kentem.jp%2Fentry%2F2024%2F10%2F15%2F090000&quot; title=&quot;【C#】is演算子って便利 - KENTEM TechBlog&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>https://cdn-ak.f.st-hatena.com/images/fotolife/k/kentem_dev/20241015/20241015090008.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-10-15 09:00:00</published>
  <title>【C#】is演算子って便利</title>
  <type>rich</type>
  <url>https://tech.kentem.jp/entry/2024/10/15/090000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
