Javaと情熱のあいだ

カステラとドーナツと珈琲

C#のnull合体演算子

NULL判定の簡素化を行う演算子をメモ。

string title = "タイトル";
string description = null;
description = description ?? title;
Console.WriteLine(description);