{"image_url":null,"blog_url":"https://takap-tech.com/","width":"100%","title":"\u3010C#\u3011\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3067null\u30c1\u30a7\u30c3\u30af\u3092\u81ea\u52d5\u5316\u3059\u308b","categories":[".NET Core",".NET Framework","C#","Unity"],"version":"1.0","blog_title":"PG\u65e5\u8a8c","height":"190","author_url":"https://blog.hatena.ne.jp/Takachan/","url":"https://takap-tech.com/entry/2021/02/15/111735","published":"2021-02-15 11:17:35","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2021%2F02%2F15%2F111735\" title=\"\u3010C#\u3011\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3067null\u30c1\u30a7\u30c3\u30af\u3092\u81ea\u52d5\u5316\u3059\u308b - PG\u65e5\u8a8c\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066 null \u30c1\u30a7\u30c3\u30af\u3092\u81ea\u52d5\u5316\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002 C# \u3067 null \u30c1\u30a7\u30c3\u30af\u3092\u3059\u308b\u5834\u5408\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3068\u601d\u3044\u307e\u3059\u3002 // \u30b5\u30f3\u30d7\u30eb\u7528\u306e\u30af\u30e9\u30b9\u3068\u5909\u6570\u5ba3\u8a00 public class Sample { public int? A { get; set; } public int? B { get; set; } } var s1 = new Sample(); // \u4e2d\u8eab\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b if(s1.A is null) Console.WriteLine(\"A\u306fnull\u3067\u3059\"); if(s1.B is null) Console.WriteLine(\"B\u306fnul\u2026","provider_url":"https://hatena.blog","type":"rich","author_name":"Takachan","provider_name":"Hatena Blog"}