Skip to content

投稿

C#における疑問符の5つの異なる意味

2019年8月5日 • 1 分で読める

C#における疑問符の5つの異なる意味

C#では、C# 8の時点で疑問符は5つの意味を持っています。

  1. 三項演算子
(true ? "true": "false")

2. Null条件演算子

items?.Count()

3. Null許容型(これはNull許容値型として再ブランド化されるべきです)

int?

4. Nullコアレッシング演算子

isnull ?? string.Empty

5. Null許容参照型

string?

Author: Chuck Conway is an AI Engineer with nearly 30 years of software engineering experience. He builds practical AI systems—content pipelines, infrastructure agents, and tools that solve real problems—and shares what he’s learning along the way. Connect with him on social media: X (@chuckconway) or visit him on YouTube and on SubStack.

著者: Chuck Conwayは、ソフトウェアエンジニアリングの経験が30年近くあるAIエンジニアです。彼は実用的なAIシステム(コンテンツパイプライン、インフラストラクチャエージェント、実際の問題を解決するツール)を構築し、学んだことを共有しています。ソーシャルメディアで彼とつながってください: X (@chuckconway) または YouTubeSubStack で彼を訪問してください。

↑ トップに戻る

こちらもおすすめ