{"id":301,"date":"2014-06-24T15:06:09","date_gmt":"2014-06-24T06:06:09","guid":{"rendered":"http:\/\/gomocool.net\/gomokulog\/?p=301"},"modified":"2014-07-14T22:01:30","modified_gmt":"2014-07-14T13:01:30","slug":"cvb3%e9%a0%85%e6%bc%94%e7%ae%97%e5%ad%90%e3%81%ae%e3%81%99%e3%81%99%e3%82%81","status":"publish","type":"post","link":"https:\/\/gomokulog.gomocool.net\/?p=301","title":{"rendered":"[C#][VB]3\u9805\u6f14\u7b97\u5b50\u306e\u3059\u3059\u3081"},"content":{"rendered":"<p>3\u9805\u6f14\u7b97\u5b50\u306f\u30013\u3064\u306e\u5024\u3092\u3068\u308b\u6f14\u7b97\u5b50\u3067\u3059\u3002<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u4eca\u306e\u3068\u3053\u308d\u6761\u4ef6\u6f14\u7b97\u5b50\u3068\u547c\u3070\u308c\u308b\u3001If\u6587\u3092\u77ed\u304f\u3057\u305f\u3088\u3046\u306a\u3082\u306e\u3057\u304b\u306a\u3044\u3089\u3057\u304f\u3001\u6697\u9ed9\u7684\u306b\u6761\u4ef6\u6f14\u7b97\u5b50\u3092\u6307\u3059\u3089\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>C#\u3067\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u66f8\u3051\u307e\u3059\u3002 x==0\u306e\u6761\u4ef6\u304c\u3001\u771f\u306e\u3068\u304d2\u3064\u76ee\u3092\u3068\u308a\u3001\u507d\u306e\u3068\u304d3\u3064\u76ee\u3092\u3068\u308b\u3002<\/p>\n<pre class=\"lang:c# decode:true\">string msg = x == 0 ? \"0\u3060\u3088\" : \"0\u3058\u3083\u306a\u3044\u3088\" ;<\/pre>\n<p>VB.NET\u3067\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:vbnet decode:true\">Dim msg As String = IIf(x = 0, \"0\u3060\u3088\", \"0\u3058\u3083\u306a\u3044\u3088\")<\/pre>\n<p>\u7c21\u6f54\u306b\u66f8\u3051\u308b\u3051\u304c\u3001\u4e00\u898b\u5206\u304b\u308a\u306b\u304f\u3044\u3002<br \/>\n\u3057\u304b\u3082\u3001\u901a\u5e38\u306eIf-else\u6587\u3067\u7f6e\u304d\u63db\u3048\u308c\u308b\u3002<br \/>\n\u305d\u308c\u3082\u3042\u3063\u3066\u30013\u9805\u6f14\u7b97\u5b50\u306f\u3001\u4f7f\u3046\u3079\u304d\u3060\u3068\u304b\u4f7f\u308f\u306a\u3044\u3079\u304d\u3060\u3068\u304b\u8272\u3005\u3042\u308b\u3088\u3046\u3067\u3059\u30fb\u30fb\u30fb\u3002<\/p>\n<p>\u81ea\u5206\u3082\u3001\u6614\u306f\u306a\u3093\u3068\u306a\u304f\u3067\u82e6\u624b\u3067\u3057\u305f\u3002<\/p>\n<p>\u3067\u3059\u304c\u3001\u4f7f\u3046\u3068\u8aad\u307f\u3084\u3059\u304f\u306a\u308b\u30b1\u30fc\u30b9\u3082\u305f\u307e\u306b\u3042\u308a\u307e\u3059\u3002<br \/>\n\u7279\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u7d61\u3080\u3068\u304d\u3084\u3001\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u7d61\u3080\u3068\u304d\u306a\u3093\u304b\u306f\u5272\u3068\u4f7f\u3044\u3069\u3053\u308d\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u81ea\u5206\u5074\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u3001\u4f7f\u7528\u4e2d\u30d5\u30e9\u30b0\u3092<br \/>\n0:\u672a\u4f7f\u7528 \/ 1:\u4f7f\u7528\u4e2d<br \/>\n\u3068\u3057\u3066\u3044\u305f\u306e\u306b\u3001\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u3001<br \/>\n0:\u7a3c\u50cd\u4e2d \/ 1:\u505c\u6b62<br \/>\n\u3068\u3001\u3060\u3044\u305f\u3044\u610f\u5473\u306f\u540c\u3058\u306a\u3093\u3060\u3051\u3069\u3001\u4f7f\u308f\u308c\u65b9\u306e\u9055\u3044\u304b\u3089\u30d5\u30e9\u30b0\u304c\u9006\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u304d\u306b\u3001\u53d7\u3051\u6e21\u3057\u306e\u90e8\u5206\u3060\u3051\u4e0b\u8a18\u306e\u3088\u3046\u306b\u66f8\u304f\u3068\u3001\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308b\u3002<\/p>\n<pre class=\"lang:vbnet decode:true\">IIf(flag = 0, 1, 0)<\/pre>\n<p>\u307e\u305f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u969b\u306bNull\u304b\u3069\u3046\u304b\u5224\u65ad\u3057\u3066\u3001Null\u306a\u3089\uff5e\u306e\u5834\u5408\u306a\u3069\u3082\u30b7\u30f3\u30d7\u30eb\u306b\u66f8\u3051\u307e\u3059\u3002<\/p>\n<pre class=\"lang:vbnet decode:true\">IIf(msg = Nothing, \"-- no comment --\", msg)<\/pre>\n<p>\u3061\u306a\u307f\u306b\u3001VisualBasic.Net\u3067\u3001.NetFramework3.5\u4ee5\u4e0a\u306e\u5834\u5408\u306f\u3001\u7406\u7531\u304c\u306a\u3044\u9650\u308a\u3001<span style=\"text-decoration: underline;\">IIf\u3067\u306f\u306a\u304fIf\u3092\u4f7f\u3063\u305f\u307b\u3046\u304c\u3088\u3044<\/span>\u304b\u3082\u3067\u3059\u3002<\/p>\n<p>C#\u306e\u4e09\u9805\u6f14\u7b97\u5b50\u306f\u554f\u984c\u306a\u3044\u306e\u3067\u3059\u304c\u3001VB.NET\u306eIIf\u306f\u30b7\u30e7\u30fc\u30c8\u30b5\u30fc\u30ad\u30c3\u30c8\u3067\u306f\u306a\u3044\u306e\u3067\u3059\u3002<br \/>\n*\u30b7\u30e7\u30fc\u30c8\u30b5\u30fc\u30ad\u30c3\u30c8\u306b\u3064\u3044\u3066\u306f<a title=\"[C#,VB]\u30b7\u30e7\u30fc\u30c8\u30b5\u30fc\u30ad\u30c3\u30c8\u8ad6\u7406\u6f14\u7b97(\u77ed\u7d61)\u3092\u4f7f\u304a\u3046\" href=\"http:\/\/gomocool.net\/gomokulog\/?p=277\">\u3053\u3061\u3089<\/a>\u306e\u8a18\u4e8b\u3092\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001Null\u306a\u3089\uff5e\u3068\u304b\u3084\u3063\u3066\u308b\u3068\u5b9f\u884c\u6642\u306b\u4f8b\u5916\u30a8\u30e9\u30fc\u3067\u843d\u3061\u308b\u6642\u304c\u3042\u308a\u307e\u3059\u30fb\u30fb\u30fb\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u81ea\u5206\u306f\u3001\u8907\u96d1\u306a\u5f0f\u306b\u5165\u308c\u30661\u884c\u306e\u4e2d\u3067\u8907\u6570\u306b\u5206\u5c90\u3059\u308b\u3088\u3046\u306a\u4f7f\u3044\u65b9\u306f\u597d\u307f\u3067\u306f\u306a\u3044\u3067\u3059\u3002<br \/>\n\u3057\u304b\u3057\u3001\u3060\u308c\u304c\u898b\u3066\u3082\u5206\u304b\u308b\u3088\u3046\u306a\u3001&#8221;Null\u306a\u3089\u7a7a\u6587\u5b57\u306b\u3059\u308b&#8221; \u7a0b\u5ea6\u3067If-Else\u3067\u6570\u884c\u306b\u306a\u308b\u3088\u3046\u306a\u3068\u304d\u306f\u3001\u4f7f\u3063\u3066\u3066\u898b\u305f\u76ee\u7684\u306b\u3082\u5206\u304b\u308a\u3084\u3059\u304f\u306a\u308b\u6c17\u304c\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u8ffd\u8a18: \u4f7f\u3063\u3066\u3044\u308b\u3046\u3061\u306b\u5909\u306b\u52d8\u9055\u3044\u3057\u305f\u3002<a title=\"[C#,VB]3\u9805\u6f14\u7b97\u5b50\u306e\u3059\u3059\u3081\" href=\"http:\/\/gomocool.net\/gomokulog\/?p=301\">[C#][VB]3\u9805\u6f14\u7b97\u5b50\u3067\u52d8\u9055\u3044<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u53c2\u7167:<br \/>\n?: \u6f14\u7b97\u5b50\u3000<a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/ty67wk28%28v=vs.90%29.aspx\">http:\/\/msdn.microsoft.com\/ja-jp\/library\/ty67wk28%28v=vs.90%29.aspx<\/a><br \/>\nIf \u6f14\u7b97\u5b50\u00a0\u00a0 <a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/bb513985%28v=vs.90%29.aspx\">http:\/\/msdn.microsoft.com\/ja-jp\/library\/bb513985%28v=vs.90%29.aspx<\/a><br \/>\nIIf \u6f14\u7b97\u5b50 <a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/27ydhh0d%28v=vs.90%29.aspx\">http:\/\/msdn.microsoft.com\/ja-jp\/library\/27ydhh0d%28v=vs.90%29.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>3\u9805\u6f14\u7b97\u5b50\u306f\u30013\u3064\u306e\u5024\u3092\u3068\u308b\u6f14\u7b97\u5b50\u3067\u3059\u3002 \u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u4eca\u306e\u3068\u3053\u308d\u6761\u4ef6\u6f14\u7b97\u5b50\u3068\u547c\u3070\u308c\u308b\u3001If\u6587\u3092\u77ed\u304f\u3057\u305f\u3088\u3046\u306a\u3082\u306e\u3057\u304b\u306a\u3044\u3089\u3057\u304f\u3001\u6697\u9ed9\u7684\u306b\u6761\u4ef6\u6f14\u7b97\u5b50\u3092\u6307\u3059\u3089\u3057\u3044\u3067\u3059\u3002 C#\u3067\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u66f8\u3051\u307e\u3059\u3002 x==0\u306e\u6761\u4ef6\u304c&hellip;  <a href=\"https:\/\/gomokulog.gomocool.net\/?p=301\" class=\"more-link\">more <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66,20,43],"tags":[],"class_list":["post-301","post","type-post","status-publish","format-standard","hentry","category-dot-net","category-csharp","category-visualbasic-net"],"_links":{"self":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=301"}],"version-history":[{"count":12,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":326,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/301\/revisions\/326"}],"wp:attachment":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}