{"id":18316,"date":"2026-07-18T21:41:24","date_gmt":"2026-07-18T12:41:24","guid":{"rendered":"https:\/\/genai-ai.co.jp\/ai-kanri\/?p=18316"},"modified":"2026-07-18T21:41:24","modified_gmt":"2026-07-18T12:41:24","slug":"cc-csharp-switch","status":"publish","type":"post","link":"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-csharp-switch\/","title":{"rendered":"\u30102026\u5e747\u6708\u6700\u65b0\u3011C# switch-case\u6587\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u6570\u5024\u30fb\u6587\u5b57\u5217\u6761\u4ef6\u5206\u5c90\u30fbswitch\u5f0f\u30fb\u5b9f\u52d9\u6d3b\u7528\u307e\u3067\u5fb9\u5e95\u89e3\u8aac"},"content":{"rendered":"\n<style>\n.g-flow-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;align-items:center;}\n.g-flow-item{background:linear-gradient(135deg,#1a1a1a,#2a1015);color:#fff;border-radius:8px;padding:16px 14px;min-width:130px;flex:1;text-align:center;}\n.g-flow-arrow{color:#dc2626;font-size:20px;font-weight:700;}\n.g-card-row{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 32px;}\n.g-card-row>div{flex:1;min-width:220px;}\n@media(max-width:600px){\n  .g-flow-row{flex-direction:column;}\n  .g-flow-arrow{transform:rotate(90deg);}\n  .g-card-row{flex-direction:column;}\n  .g-card-row>div{min-width:100%;}\n}\n<\/style>\n\n\n\n<div style=\"background:#f8f9fa;border-radius:12px;padding:24px 28px;margin:0 0 32px;border-left:4px solid #dc2626;\">\n  <p style=\"font-size:15px;font-weight:700;color:#1a1a1a;margin:0 0 16px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9<\/p>\n  <ol style=\"margin:0;padding-left:20px;font-size:14px;line-height:2.2;list-style:none;\">\n    <li><a href=\"#sec-01\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">01<\/span>switch-case\u6587\u3068\u306f\u4f55\u304b\u2015\u2015\u6761\u4ef6\u5206\u5c90\u306e\u57fa\u790e\u3068\u696d\u52d9\u30d5\u30ed\u30fc\u3078\u306e\u5bfe\u5fdc<\/a><\/li>\n    <li><a href=\"#sec-02\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">02<\/span>\u57fa\u672c\u69cb\u6587\u3068\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306aswitch-case\u306e\u66f8\u304d\u65b9<\/a><\/li>\n    <li><a href=\"#sec-03\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">03<\/span>\u6570\u5024\u3067\u306e\u6761\u4ef6\u5206\u5c90\u2015\u2015\u30b9\u30b3\u30a2\u30fb\u7b49\u7d1a\u30fb\u30e9\u30f3\u30af\u5224\u5b9a\u306e\u5b9f\u4f8b<\/a><\/li>\n    <li><a href=\"#sec-04\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">04<\/span>\u6587\u5b57\u5217\u3067\u306e\u6761\u4ef6\u5206\u5c90\u2015\u2015\u30b3\u30de\u30f3\u30c9\u30fb\u30b9\u30c6\u30fc\u30bf\u30b9\u30fb\u696d\u7a2e\u5225\u51e6\u7406<\/a><\/li>\n    <li><a href=\"#sec-05\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">05<\/span>\u8907\u6570\u6761\u4ef6\u30921\u3064\u306ecase\u306b\u307e\u3068\u3081\u308b\u65b9\u6cd5<\/a><\/li>\n    <li><a href=\"#sec-06\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">06<\/span>default\u30b1\u30fc\u30b9\u306e\u91cd\u8981\u6027\u3068\u5b89\u5168\u306a\u8a2d\u8a08<\/a><\/li>\n    <li><a href=\"#sec-07\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">07<\/span>C# 8.0\u4ee5\u964d\u306eswitch\u5f0f\uff08switch expression\uff09<\/a><\/li>\n    <li><a href=\"#sec-08\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">08<\/span>switch vs if-else \u306e\u4f7f\u3044\u5206\u3051\u5224\u65ad\u57fa\u6e96<\/a><\/li>\n    <li><a href=\"#sec-09\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">09<\/span>\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u5b9f\u8df5\u9069\u7528\u4f8b<\/a><\/li>\n    <li><a href=\"#sec-10\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">10<\/span>\u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u3068\u5bfe\u51e6\u6cd5<\/a><\/li>\n    <li><a href=\"#sec-11\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">11<\/span>Claude Code\u3067\u6761\u4ef6\u5206\u5c90\u30ed\u30b8\u30c3\u30af\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/a><\/li>\n    <li><a href=\"#faq\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">FAQ<\/span>\u3088\u304f\u3042\u308b\u8cea\u554f<\/a><\/li>\n  <\/ol>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u300cC#\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u3044\u308b\u304c\u3001\u6761\u4ef6\u5206\u5c90\u306e\u66f8\u304d\u65b9\u304c\u8907\u6570\u3042\u3063\u3066\u3001\u3069\u308c\u3092\u3044\u3064\u4f7f\u3048\u3070\u3044\u3044\u304b\u5206\u304b\u3089\u306a\u3044\u300d\u2014\u2014\u305d\u3093\u306a\u7591\u554f\u3092\u62b1\u3048\u3066\u3044\u308b\u65b9\u306f\u591a\u3044\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u958b\u767a\u306b\u304a\u3044\u3066\u3001<strong>\u6761\u4ef6\u5206\u5c90\u306e\u5b9f\u88c5\u65b9\u6cd5<\/strong>\u306f\u3001\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u3084\u3059\u3055\u30fb\u4fdd\u5b88\u3057\u3084\u3059\u3055\u306b\u76f4\u7d50\u3057\u307e\u3059\u3002\u4e2d\u3067\u3082<strong>switch-case\u6587<\/strong>\u306f\u3001\u8907\u6570\u306e\u9078\u629e\u80a2\u304b\u30891\u3064\u3092\u9078\u3076\u51e6\u7406\u306b\u7279\u5316\u3057\u305f\u69cb\u6587\u3067\u3059\u3002if-else\u3092\u4f55\u91cd\u306b\u3082\u91cd\u306d\u308b\u3088\u308a\u3001\u306f\u308b\u304b\u306b\u30b9\u30c3\u30ad\u30ea\u66f8\u3051\u307e\u3059\u3002\u3055\u3089\u306bC# 8.0\u4ee5\u964d\u3067\u306f\u3001<strong>switch\u5f0f\uff08switch expression\uff09<\/strong>\u3068\u3044\u3046\u65b0\u3057\u3044\u66f8\u304d\u65b9\u3082\u767b\u5834\u3057\u3001\u3088\u308a\u7c21\u6f54\u306a\u30b3\u30fc\u30c9\u304c\u5b9f\u73fe\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001C#\u306eswitch-case\u6587\u3092<strong>\u57fa\u672c\u69cb\u6587\u304b\u3089\u5b9f\u52d9\u30d1\u30bf\u30fc\u30f3\u307e\u3067<\/strong>\u3001\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u7d4c\u55b6\u8005\u30fb\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u306e\u8a2d\u8a08\u62c5\u5f53\u8005\u3084\u3001\u30a8\u30f3\u30b8\u30cb\u30a2\u30c1\u30fc\u30e0\u306b\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3092\u884c\u3046\u7acb\u5834\u306e\u65b9\u306b\u3082\u5f79\u7acb\u3064\u5185\u5bb9\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">switch-case\u6587\u3092\u300c\u696d\u52d9\u30d5\u30ed\u30fc\u306e\u5206\u5c90\u8868\u300d\u3068\u8003\u3048\u308b\u3068\u3001\u975e\u5e38\u306b\u7406\u89e3\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002\u300c\u9867\u5ba2\u30e9\u30f3\u30af\u304cGold\u306a\u3089\u25ef\u25ef\u306e\u5272\u5f15\u3001Silver\u306a\u3089\u25ef\u25ef\u3001\u305d\u306e\u4ed6\u306f\u901a\u5e38\u6599\u91d1\u300d\u3068\u3044\u3063\u305f\u5224\u65ad\u3092\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u8868\u73fe\u3057\u305f\u3082\u306e\u304cswitch-case\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u307f\u7d42\u3048\u308b\u3068\u3001C#\u306eswitch-case\u6587\u306e\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067\u5168\u3066\u7406\u89e3\u3067\u304d\u307e\u3059\u3002\u3055\u3089\u306b\u3001Claude Code\u3092\u4f7f\u3048\u3070switch\u6587\u306e\u30ed\u30b8\u30c3\u30af\u8a2d\u8a08\u305d\u306e\u3082\u306e\u3092AI\u306b\u4efb\u305b\u3089\u308c\u308b\u3001\u3068\u3044\u3046\u5b9f\u8df5\u7684\u306a\u6d3b\u7528\u6cd5\u3082\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3092\u6700\u5f8c\u307e\u3067\u8aad\u3080\u3068\u3001\u4ee5\u4e0b\u306e\u3053\u3068\u304c\u660e\u78ba\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>switch-case\u6587\u306e\u57fa\u672c\u69cb\u6587<\/strong>\u3068\u3001if-else\u3068\u306e\u9055\u3044\u3092\u6b63\u78ba\u306b\u7406\u89e3\u3067\u304d\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u6570\u5024\u30fb\u6587\u5b57\u5217\u30fbenum<\/strong>\u306a\u3069\u5404\u30c7\u30fc\u30bf\u578b\u3067\u306eswitch-case\u306e\u66f8\u304d\u65b9\u304c\u308f\u304b\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u8907\u6570\u6761\u4ef6\u306e\u307e\u3068\u3081\u65b9<\/strong>\u3084default\u30b1\u30fc\u30b9\u306e\u8a2d\u8a08\u65b9\u6cd5\u3092\u7fd2\u5f97\u3067\u304d\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>C# 8.0\u4ee5\u964d\u306eswitch\u5f0f<\/strong>\u306e\u66f8\u304d\u65b9\u3068\u65e7\u6765\u3068\u306e\u4f7f\u3044\u5206\u3051\u304c\u308f\u304b\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u5177\u4f53\u7684\u306a\u9069\u7528\u4f8b<\/strong>\u3092\u901a\u3058\u3066\u5b9f\u8df5\u7684\u306a\u8a2d\u8a08\u30a4\u30e1\u30fc\u30b8\u304c\u6301\u3066\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>Claude Code\u3067AI\u304cswitch\u6587\u3092\u81ea\u52d5\u751f\u6210<\/strong>\u3059\u308b\u30c7\u30e2\u3092\u4f53\u9a13\u3067\u304d\u308b<\/span><\/div>\n\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-01\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">01<\/span>\n  <span class=\"section-label\" style=\"display:block;\">WHAT IS SWITCH-CASE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">switch-case\u6587\u3068\u306f\u4f55\u304b\u2015\u2015\u6761\u4ef6\u5206\u5c90\u306e\u57fa\u790e\u3068\u696d\u52d9\u30d5\u30ed\u30fc\u3078\u306e\u5bfe\u5fdc<\/span>\n  <span class=\"section-desc\">\u696d\u52d9\u30d5\u30ed\u30fc\u306e\u300c\u5206\u5c90\u8868\u300d\u3092\u30b3\u30fc\u30c9\u3067\u8868\u73fe\u3059\u308b\u69cb\u6587<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u306e<strong>switch-case\u6587<\/strong>\u306f\u3001\u3042\u308b\u5909\u6570\u306e\u5024\u306b\u5fdc\u3058\u3066\u7570\u306a\u308b\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u5236\u5fa1\u69cb\u6587\u3067\u3059\u3002\u300c\u6761\u4ef6\u5206\u5c90\u300d\u306e\u4e00\u7a2e\u3067\u3059\u304c\u3001if-else\u3068\u306f\u7570\u306a\u308a\u3001<strong>\u8907\u6570\u306e\u5024\u3092\u6bd4\u8f03\u3057\u3066\u5bfe\u5fdc\u3059\u308b\u51e6\u7406\u3092\u9078\u629e\u3059\u308b<\/strong>\u3068\u3044\u3046\u5f62\u306b\u7279\u5316\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d3\u30b8\u30cd\u30b9\u306e\u73fe\u5834\u3067\u4f8b\u3048\u308b\u3068\u3001<strong>\u6599\u91d1\u30c6\u30fc\u30d6\u30eb\u3084\u7b49\u7d1a\u5236\u5ea6\u306b\u57fa\u3065\u304f\u5224\u65ad<\/strong>\u304c\u307e\u3055\u306bswitch-case\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002\u300c\u4f1a\u54e1\u30e9\u30f3\u30af\u304cPlatinum\u306a\u308920%\u5272\u5f15\u3001Gold\u306a\u308910%\u5272\u5f15\u3001Silver\u306a\u30895%\u5272\u5f15\u3001\u305d\u308c\u4ee5\u5916\u306f\u901a\u5e38\u6599\u91d1\u300d\u3068\u3044\u3046\u696d\u52d9\u30eb\u30fc\u30eb\u3092\u3001switch-case\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u8868\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>switch-case\u6587<\/strong>\uff1a\u3042\u308b\u5909\u6570\u306e\u5024\u3092\u8907\u6570\u306e\u5019\u88dc\uff08case\uff09\u3068\u6bd4\u8f03\u3057\u3001\u4e00\u81f4\u3057\u305fcase\u306e\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u5236\u5fa1\u69cb\u9020\u3002Java\u3084C#\u306a\u3069\u306e\u8a00\u8a9e\u3067\u63a1\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300c\u5206\u5c90\u8868\u300d\u3084\u300c\u5834\u5408\u5206\u3051\u30ea\u30b9\u30c8\u300d\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u8868\u73fe\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">1-1. switch-case\u6587\u304c\u767b\u5834\u3057\u305f\u80cc\u666f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u306f\u3001\u300c\u6761\u4ef6\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u51e6\u7406\u3092\u3059\u308b\u300d\u5834\u9762\u306f\u975e\u5e38\u306b\u591a\u304f\u767a\u751f\u3057\u307e\u3059\u3002\u6700\u3082\u57fa\u672c\u7684\u306a\u65b9\u6cd5\u306f<strong>if-else\u6587<\/strong>\u3067\u3059\u304c\u3001\u6bd4\u8f03\u3059\u308b\u5024\u304c5\u7a2e\u985e\u300110\u7a2e\u985e\u3068\u5897\u3048\u308b\u3068\u3001if-else\u6587\u306f\u30cd\u30b9\u30c8\uff08\u5165\u308c\u5b50\uff09\u304c\u6df1\u304f\u306a\u308a\u3001\u8aad\u307f\u306b\u304f\u3044\u30b3\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">switch-case\u6587\u306f\u3001<strong>\u300c\u540c\u4e00\u306e\u5909\u6570\u3092\u8907\u6570\u306e\u5b9a\u6570\u5024\u3068\u6bd4\u8f03\u3059\u308b\u300d\u3068\u3044\u3046\u30d1\u30bf\u30fc\u30f3<\/strong>\u306b\u7279\u5316\u3057\u3066\u751f\u307e\u308c\u307e\u3057\u305f\u3002if-else\u3068\u6bd4\u3079\u3066\u6761\u4ef6\u304c\u4e00\u5217\u306b\u4e26\u3076\u305f\u3081\u3001\u8996\u899a\u7684\u306b\u300c\u3069\u306e\u5024\u306e\u3068\u304d\u3069\u306e\u51e6\u7406\u304b\u300d\u304c\u3072\u3068\u76ee\u3067\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\">\u5909\u6570\u306e\u5024\u3092\u8a55\u4fa1<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">case 1 \u3068\u4e00\u81f4\uff1f<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">case 2 \u3068\u4e00\u81f4\uff1f<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">default \u51e6\u7406<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u51e6\u7406\u5b9f\u884c &amp; break<\/div>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">switch-case\u306f\u8a00\u308f\u3070\u300c\u8907\u6570\u306e\u9078\u629e\u80a2\u304c\u3042\u308b\u696d\u52d9\u30de\u30cb\u30e5\u30a2\u30eb\u300d\u306e\u30b3\u30fc\u30c9\u7248\u3067\u3059\u3002\u300c\u53d7\u6ce8\u30b9\u30c6\u30fc\u30bf\u30b9\u304c\"pending\"\u306a\u3089\u901a\u77e5\u30e1\u30fc\u30eb\u9001\u4fe1\u3001\"approved\"\u306a\u3089\u8acb\u6c42\u66f8\u767a\u884c\u3001\"rejected\"\u306a\u3089\u62c5\u5f53\u8005\u306b\u8b66\u544a\u300d\u3068\u3044\u3063\u305f\u30d5\u30ed\u30fc\u3092\u305d\u306e\u307e\u307e\u30b3\u30fc\u30c9\u306b\u3067\u304d\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">1-2. if-else\u3068switch-case\u306e\u6839\u672c\u7684\u306a\u9055\u3044<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e21\u8005\u3092\u4e00\u8a00\u3067\u533a\u5225\u3059\u308b\u306a\u3089\u3001<strong>if-else\u306f\u300c\u6761\u4ef6\u5f0f\u3067\u5206\u5c90\u300d\u3001switch-case\u306f\u300c\u5024\u306e\u4e00\u81f4\u3067\u5206\u5c90\u300d<\/strong>\u3067\u3059\u3002if-else\u306f\u300cx > 0\u300d\u300cy == null\u300d\u300c\u6587\u5b57\u5217\u304c\u7a7a\u3067\u306a\u3044\u300d\u306a\u3069\u3001\u8907\u96d1\u306a\u6761\u4ef6\u5f0f\u3092\u66f8\u3051\u307e\u3059\u3002\u4e00\u65b9switch-case\u306f\u300c\u5909\u6570\u306e\u5024\u304c10\u306a\u3089\u300d\u300c\u5909\u6570\u306e\u5024\u304c\"admin\"\u306a\u3089\u300d\u3068\u3044\u3046\u5024\u306e\u4e00\u81f4\u6bd4\u8f03\u306b\u9650\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u6bd4\u8f03\u9805\u76ee<\/th><th>if-else\u6587<\/th><th>switch-case\u6587<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u6761\u4ef6\u306e\u7a2e\u985e<\/td><td>\u4efb\u610f\u306e\u6761\u4ef6\u5f0f\uff08\u6bd4\u8f03\u30fb\u8ad6\u7406\u6f14\u7b97\u306a\u3069\uff09<\/td><td>\u5909\u6570\u3068\u5b9a\u6570\u5024\u306e\u4e00\u81f4\u6bd4\u8f03<\/td><\/tr>\n<tr><td>\u6bd4\u8f03\u5bfe\u8c61\u306e\u578b<\/td><td>\u4efb\u610f<\/td><td>\u6574\u6570\u30fb\u6587\u5b57\u5217\u30fbenum\uff08C#\u306e\u5834\u5408\uff09<\/td><\/tr>\n<tr><td>\u53ef\u8aad\u6027\uff08\u9078\u629e\u80a2\u304c\u591a\u3044\u5834\u5408\uff09<\/td><td>\u8907\u96d1\u306b\u306a\u308a\u304c\u3061<\/td><td>\u4e00\u89a7\u6027\u304c\u9ad8\u304f\u30b9\u30c3\u30ad\u30ea<\/td><\/tr>\n<tr><td>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9<\/td><td>\u6761\u4ef6\u3092\u9806\u756a\u306b\u8a55\u4fa1<\/td><td>\u30b3\u30f3\u30d1\u30a4\u30e9\u304c\u30b8\u30e3\u30f3\u30d7\u30c6\u30fc\u30d6\u30eb\u306b\u6700\u9069\u5316\u53ef\u80fd<\/td><\/tr>\n<tr><td>\u8907\u6570\u6761\u4ef6\u306e\u307e\u3068\u3081<\/td><td>||\uff08OR\uff09\u3067\u9023\u7d50<\/td><td>\u8907\u6570case\u30e9\u30d9\u30eb\u3092\u4e26\u3079\u308b<\/td><\/tr>\n<tr><td>\u7bc4\u56f2\u6307\u5b9a<\/td><td>\u53ef\u80fd\uff08x >= 10 \u306a\u3069\uff09<\/td><td>\u57fa\u672c\u4e0d\u53ef\uff08switch\u5f0f\u3067when\u3092\u4f7f\u3048\u3070\u53ef\u80fd\uff09<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">\u4f7f\u3044\u5206\u3051\u306e\u57fa\u672c\u65b9\u91dd<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">switch-case\u306f\u300c\u540c\u3058\u5909\u6570\u306e\u5024\u3092\u30015\u3064\u4ee5\u4e0a\u306e\u5b9a\u6570\u5024\u3068\u6bd4\u8f03\u3059\u308b\u300d\u3068\u304d\u306b\u9078\u3073\u307e\u3057\u3087\u3046\u30023\u301c4\u3064\u7a0b\u5ea6\u306e\u5358\u7d14\u306a\u5206\u5c90\u306fif-else\u3067\u5341\u5206\u3067\u3059\u3002\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3067\u300c\u3053\u306eif-else\u306fswitch-case\u3067\u66f8\u3051\u306a\u3044\u304b\uff1f\u300d\u3068\u554f\u308f\u308c\u305f\u5834\u5408\u306f\u3001\u9078\u629e\u80a2\u304c\u591a\u3044\u30b1\u30fc\u30b9\u304c\u5019\u88dc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-02\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">02<\/span>\n  <span class=\"section-label\" style=\"display:block;\">BASIC SYNTAX<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u57fa\u672c\u69cb\u6587\u3068\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306aswitch-case\u306e\u66f8\u304d\u65b9<\/span>\n  <span class=\"section-desc\">break\u3068default\u3092\u542b\u3080\u5b8c\u5168\u306a\u57fa\u672c\u30d1\u30bf\u30fc\u30f3\u3092\u7406\u89e3\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u306eswitch-case\u6587\u306e\u57fa\u672c\u69cb\u6587\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u305f\u3053\u3068\u304c\u306a\u3044\u65b9\u3067\u3082\u3001\u30d3\u30b8\u30cd\u30b9\u4e0a\u306e\u610f\u5473\u3068\u5bfe\u5fdc\u4ed8\u3051\u306a\u304c\u3089\u8aad\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u57fa\u672c\u7684\u306aswitch-case\u6587\u306e\u69cb\u9020\nint customerRank = 2;\n\nswitch (customerRank)\n{\n    case 1:\n        Console.WriteLine(\"Platinum\u30e9\u30f3\u30af\uff1a20%\u5272\u5f15\");\n        break;\n    case 2:\n        Console.WriteLine(\"Gold\u30e9\u30f3\u30af\uff1a10%\u5272\u5f15\");\n        break;\n    case 3:\n        Console.WriteLine(\"Silver\u30e9\u30f3\u30af\uff1a5%\u5272\u5f15\");\n        break;\n    default:\n        Console.WriteLine(\"\u901a\u5e38\u30e9\u30f3\u30af\uff1a\u5272\u5f15\u306a\u3057\");\n        break;\n}\n\/\/ \u51fa\u529b: Gold\u30e9\u30f3\u30af\uff1a10%\u5272\u5f15<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u89e3\u304f\u3068\u3001\u69cb\u9020\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002<code>switch(\u5909\u6570)<\/code>\u306e\u62ec\u5f27\u5185\u306b\u6bd4\u8f03\u3057\u305f\u3044\u5909\u6570\u3092\u66f8\u304d\u3001\u305d\u306e\u5f8c\u306e\u6ce2\u62ec\u5f27<code>{ }<\/code>\u306e\u4e2d\u306b<code>case \u5024:<\/code>\u306e\u5f62\u3067\u30b1\u30fc\u30b9\u3092\u4e26\u3079\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>break\u6587<\/strong>\uff1aswitch-case\u306ecase\u30d6\u30ed\u30c3\u30af\u306e\u672b\u5c3e\u306b\u66f8\u304f\u30ad\u30fc\u30ef\u30fc\u30c9\u3002\u3053\u308c\u304c\u306a\u3044\u3068\u3001\u4e00\u81f4\u3057\u305fcase\u306e\u51e6\u7406\u304c\u7d42\u308f\u3063\u3066\u3082\u6b21\u306ecase\u3078\u300c\u843d\u3061\u3066\uff08\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\u3057\u3066\uff09\u300d\u51e6\u7406\u304c\u7d9a\u3044\u3066\u3057\u307e\u3044\u307e\u3059\u3002C#\u3067\u306f\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\u306f\u57fa\u672c\u7684\u306b\u7981\u6b62\u3055\u308c\u3066\u304a\u308a\u3001break\u3092\u66f8\u304b\u306a\u3044\u3068\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2-1. \u5404\u8981\u7d20\u306e\u5f79\u5272<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">switch-case\u6587\u3092\u69cb\u6210\u3059\u308b\u5404\u8981\u7d20\u306e\u5f79\u5272\u3092\u6574\u7406\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>switch\uff08\u5909\u6570\uff09<\/strong>\uff1a\u6bd4\u8f03\u5bfe\u8c61\u306e\u5909\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u6574\u6570\u30fb\u6587\u5b57\u5217\u30fbenum\u304c\u4f7f\u3048\u307e\u3059<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>case \u5024:<\/strong>\uff1a\u5909\u6570\u304c\u3053\u306e\u5024\u3068\u4e00\u81f4\u3057\u305f\u3068\u304d\u3001\u76f4\u5f8c\u306e\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>break;<\/strong>\uff1a\u30b1\u30fc\u30b9\u306e\u51e6\u7406\u7d42\u4e86\u3092\u5ba3\u8a00\u3002\u5fc5\u305acase\u30d6\u30ed\u30c3\u30af\u306e\u672b\u5c3e\u306b\u66f8\u304d\u307e\u3059<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>default:<\/strong>\uff1a\u3069\u306ecase\u306b\u3082\u4e00\u81f4\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306e\u51e6\u7406\u3002\u7701\u7565\u53ef\u80fd\u3067\u3059\u304c\u8a18\u8ff0\u3092\u63a8\u5968\u3057\u307e\u3059<\/span><\/div>\n\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">C#\u3067\u306f\u300c\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\uff08fall-through\uff09\u300d\u3068\u547c\u3070\u308c\u308b\u3001break\u3092\u7701\u7565\u3057\u3066\u6b21\u306ecase\u306b\u51e6\u7406\u304c\u6d41\u308c\u308b\u52d5\u4f5c\u306f\u57fa\u672c\u7684\u306b\u7981\u6b62\u3055\u308c\u3066\u3044\u307e\u3059\u3002Java\u306a\u3069\u3067\u306f\u610f\u56f3\u7684\u306b\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\u3092\u4f7f\u3046\u5834\u9762\u304c\u3042\u308a\u307e\u3059\u304c\u3001C#\u3067\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001case\u30e9\u30d9\u30eb\u3092\u8907\u6570\u4e26\u3079\u308b\u5834\u5408\u306f\u4f8b\u5916\u3067\u3059\uff08\u5f8c\u8ff0\uff09\u3002<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2-2. switch-case\u306e\u51e6\u7406\u30d5\u30ed\u30fc<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">switch-case\u6587\u304c\u5b9f\u884c\u3055\u308c\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u6d41\u308c\u3067\u51e6\u7406\u304c\u9032\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\">switch(\u5909\u6570)\u3092\u8a55\u4fa1<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u4e0a\u304b\u3089\u9806\u306bcase\u3092\u6bd4\u8f03<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u4e00\u81f4\u3057\u305fcase\u306e\u51e6\u7406\u3092\u5b9f\u884c<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">break\u3067switch\u6587\u3092\u629c\u3051\u308b<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u6b21\u306e\u51e6\u7406\u3078\u7d9a\u884c<\/div>\n<\/div>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">C#\u3067\u306ebreak\u5fd8\u308c\u306b\u6ce8\u610f<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">C#\u306f\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\u3092\u8a31\u53ef\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001break\u3092\u66f8\u304d\u5fd8\u308c\u308b\u3068\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u300c\u5236\u5fa1\u306f1\u3064\u306ecase\u53e5\u304b\u3089\u5225\u306ecase\u53e5\u306b\u6d41\u308c\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u300d\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u305f\u3089\u3001\u307e\u305abreak\u306e\u4ed8\u3051\u5fd8\u308c\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-03\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">03<\/span>\n  <span class=\"section-label\" style=\"display:block;\">NUMERIC SWITCH<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u6570\u5024\u3067\u306e\u6761\u4ef6\u5206\u5c90\u2015\u2015\u30b9\u30b3\u30a2\u30fb\u7b49\u7d1a\u30fb\u30e9\u30f3\u30af\u5224\u5b9a\u306e\u5b9f\u4f8b<\/span>\n  <span class=\"section-desc\">\u6574\u6570\u5024\u3092\u4f7f\u3063\u305fswitch-case\u306e\u5b9f\u52d9\u30d1\u30bf\u30fc\u30f3\u3092\u7fd2\u5f97\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6570\u5024\u306b\u3088\u308b\u6761\u4ef6\u5206\u5c90\u306f\u3001switch-case\u306e\u6700\u3082\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3067\u3059\u3002\u30b9\u30b3\u30a2\u5224\u5b9a\u30fb\u7b49\u7d1a\u5206\u3051\u30fb\u66dc\u65e5\u5224\u5b9a\u306a\u3069\u3001\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u306b\u983b\u7e41\u306b\u767b\u5834\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3-1. \u30b9\u30b3\u30a2\u306b\u3088\u308b\u8a55\u4fa1\u30e9\u30f3\u30af\u5224\u5b9a<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8a66\u9a13\u3084\u696d\u7e3e\u8a55\u4fa1\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u300c\u30b9\u30b3\u30a2\u5e2f\u306b\u3088\u308b\u30e9\u30f3\u30af\u5224\u5b9a\u300d\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u30dd\u30a4\u30f3\u30c8\u306f\u3001<code>score \/ 10<\/code>\u3068\u3044\u3046\u6574\u6570\u9664\u7b97\u3067\u300110\u70b9\u523b\u307f\u306e\u30b0\u30eb\u30fc\u30d7\u306b\u5206\u985e\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u30b9\u30b3\u30a2\u306b\u3088\u308b\u8a55\u4fa1\u30e9\u30f3\u30af\u5224\u5b9a\nint score = 85;\n\nswitch (score \/ 10)\n{\n    case 10:\n    case 9:\n        Console.WriteLine(\"S\u8a55\u4fa1\uff1a\u512a\u79c0\");\n        break;\n    case 8:\n        Console.WriteLine(\"A\u8a55\u4fa1\uff1a\u826f\u597d\");\n        break;\n    case 7:\n        Console.WriteLine(\"B\u8a55\u4fa1\uff1a\u6a19\u6e96\");\n        break;\n    case 6:\n        Console.WriteLine(\"C\u8a55\u4fa1\uff1a\u8981\u6539\u5584\");\n        break;\n    default:\n        Console.WriteLine(\"D\u8a55\u4fa1\uff1a\u8981\u30b5\u30dd\u30fc\u30c8\");\n        break;\n}\n\/\/ score=85\u306e\u5834\u5408: A\u8a55\u4fa1\uff1a\u826f\u597d<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u91cd\u8981\u306a\u306e\u306f\u3001<code>case 10: case 9:<\/code>\u306e\u3088\u3046\u306b<strong>\u8907\u6570\u306ecase\u30e9\u30d9\u30eb\u3092\u9023\u7d9a\u3057\u3066\u66f8\u3051\u308b\u3053\u3068<\/strong>\u3067\u3059\u300290\u301c100\u70b9\uff0810\u306e\u4f4d\u304c9\u304b10\uff09\u3092\u307e\u3068\u3081\u3066\u540c\u3058\u51e6\u7406\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u8a73\u7d30\u306f\u5f8c\u8ff0\u306e\u30bb\u30af\u30b7\u30e7\u30f35\u3067\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3-2. \u66dc\u65e5\u5224\u5b9a\u306e\u5b9f\u88c5\u4f8b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">DayOfWeek\u5217\u6319\u578b\uff08enum\uff09\u3092\u4f7f\u3063\u305f\u66dc\u65e5\u5225\u306e\u51e6\u7406\u5206\u5c90\u306f\u3001\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ DayOfWeek\u3092\u4f7f\u3063\u305f\u66dc\u65e5\u5224\u5b9a\nDayOfWeek today = DateTime.Now.DayOfWeek;\n\nswitch (today)\n{\n    case DayOfWeek.Monday:\n        Console.WriteLine(\"\u9031\u6b21\u30ec\u30dd\u30fc\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\");\n        break;\n    case DayOfWeek.Wednesday:\n        Console.WriteLine(\"\u4e2d\u9593\u9032\u6357\u3092\u78ba\u8a8d\u3057\u307e\u3059\");\n        break;\n    case DayOfWeek.Friday:\n        Console.WriteLine(\"\u9031\u5831\u3092\u4f5c\u6210\u3057\u307e\u3059\");\n        break;\n    case DayOfWeek.Saturday:\n    case DayOfWeek.Sunday:\n        Console.WriteLine(\"\u4f11\u65e5\u306e\u305f\u3081\u51e6\u7406\u3092\u30b9\u30ad\u30c3\u30d7\");\n        break;\n    default:\n        Console.WriteLine(\"\u901a\u5e38\u696d\u52d9\u65e5\");\n        break;\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">DayOfWeek\u306e\u3088\u3046\u306aenum\u578b\u306fswitch-case\u3068\u975e\u5e38\u306b\u76f8\u6027\u304c\u826f\u3044\u3002Visual Studio\u3084Cursor\u306a\u3069\u306eIDE\u3092\u4f7f\u3063\u3066\u3044\u308c\u3070\u3001switch\u6587\u3092\u66f8\u304d\u59cb\u3081\u305f\u6bb5\u968e\u3067enum\u306e\u5168\u30b1\u30fc\u30b9\u3092\u81ea\u52d5\u88dc\u5b8c\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>enum\uff08\u5217\u6319\u578b\uff09<\/strong>\uff1a\u8907\u6570\u306e\u5b9a\u6570\u3092\u307e\u3068\u3081\u3066\u540d\u524d\u3092\u3064\u3051\u305f\u30c7\u30fc\u30bf\u578b\u3002DayOfWeek\uff08\u66dc\u65e5\uff09\u3001OrderStatus\uff08\u6ce8\u6587\u30b9\u30c6\u30fc\u30bf\u30b9\uff09\u306a\u3069\u3001\u6c7a\u307e\u3063\u305f\u9078\u629e\u80a2\u304c\u3042\u308b\u5834\u9762\u3067\u4f7f\u3044\u307e\u3059\u3002switch-case\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u3001\u300c\u9078\u629e\u80a2\u306e\u6f0f\u308c\u300d\u3092\u30b3\u30f3\u30d1\u30a4\u30e9\u304c\u691c\u51fa\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">enum\u3068switch-case\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u30e1\u30ea\u30c3\u30c8<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">enum\u3092switch-case\u3067\u4f7f\u3046\u6700\u5927\u306e\u5229\u70b9\u306f\u3001IDE\u304c\u300c\u672a\u51e6\u7406\u306eenum\u30b1\u30fc\u30b9\u304c\u3042\u308b\u300d\u3068\u8b66\u544a\u3092\u51fa\u3057\u3066\u304f\u308c\u308b\u3053\u3068\u3067\u3059\u3002OrderStatus\u306b\u65b0\u3057\u3044\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8ffd\u52a0\u3057\u305f\u3068\u304d\u3001switch\u6587\u3067\u51e6\u7406\u304c\u6f0f\u308c\u3066\u3044\u308b\u3068IDE\u3084Claude Code\u304c\u6559\u3048\u3066\u304f\u308c\u307e\u3059\u3002\u3053\u308c\u306f\u30b7\u30b9\u30c6\u30e0\u306e\u5b89\u5168\u6027\u3092\u5927\u304d\u304f\u9ad8\u3081\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-04\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">04<\/span>\n  <span class=\"section-label\" style=\"display:block;\">STRING SWITCH<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u6587\u5b57\u5217\u3067\u306e\u6761\u4ef6\u5206\u5c90\u2015\u2015\u30b3\u30de\u30f3\u30c9\u30fb\u30b9\u30c6\u30fc\u30bf\u30b9\u30fb\u696d\u7a2e\u5225\u51e6\u7406<\/span>\n  <span class=\"section-desc\">string\u3092\u4f7f\u3063\u305fswitch-case\u306e\u5b9f\u52d9\u30d1\u30bf\u30fc\u30f3\u3068\u6ce8\u610f\u70b9<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u306eswitch-case\u6587\u306f\u6587\u5b57\u5217\uff08string\u578b\uff09\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u30b3\u30de\u30f3\u30c9\u306e\u632f\u308a\u5206\u3051\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u540d\u306b\u3088\u308b\u51e6\u7406\u5206\u5c90\u3001API \u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u7a2e\u5225\u5224\u5b9a\u306a\u3069\u3001\u5b9f\u52d9\u3067\u306e\u6d3b\u7528\u5834\u9762\u304c\u975e\u5e38\u306b\u591a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u6ce8\u6587\u30b9\u30c6\u30fc\u30bf\u30b9\u306b\u3088\u308b\u51e6\u7406\u632f\u308a\u5206\u3051\uff08\u6587\u5b57\u5217\u7248\uff09\nstring orderStatus = \"approved\";\n\nswitch (orderStatus)\n{\n    case \"pending\":\n        Console.WriteLine(\"\u6ce8\u6587\u78ba\u8a8d\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\");\n        SendConfirmationEmail();\n        break;\n    case \"approved\":\n        Console.WriteLine(\"\u627f\u8a8d\u6e08\uff1a\u8acb\u6c42\u66f8\u3092\u767a\u884c\");\n        GenerateInvoice();\n        break;\n    case \"shipped\":\n        Console.WriteLine(\"\u767a\u9001\u6e08\uff1a\u8ffd\u8de1\u756a\u53f7\u3092\u901a\u77e5\");\n        SendTrackingNotification();\n        break;\n    case \"cancelled\":\n        Console.WriteLine(\"\u30ad\u30e3\u30f3\u30bb\u30eb\uff1a\u8fd4\u91d1\u51e6\u7406\u3092\u958b\u59cb\");\n        InitiateRefund();\n        break;\n    default:\n        Console.WriteLine($\"\u672a\u77e5\u306e\u30b9\u30c6\u30fc\u30bf\u30b9: {orderStatus}\");\n        LogUnknownStatus(orderStatus);\n        break;\n}<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u5b57\u5217switch-case\u3067\u6ce8\u610f\u3059\u3079\u304d\u70b9\u304c\u3042\u308a\u307e\u3059\u3002C#\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306f<strong>\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u3092\u533a\u5225\uff08case-sensitive\uff09<\/strong>\u3057\u307e\u3059\u3002\"approved\"\u3068\"Approved\"\u306f\u7570\u306a\u308b\u5024\u3068\u3057\u3066\u6271\u308f\u308c\u3001\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">\u6587\u5b57\u5217\u306e\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306b\u6ce8\u610f<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\"approved\"\u3068\"Approved\"\u306fC#\u306eswitch-case\u3067\u306f\u5225\u7269\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002\u5916\u90e8API\u3084\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u304b\u3089\u53d7\u3051\u53d6\u3063\u305f\u6587\u5b57\u5217\u3092switch-case\u3067\u5206\u5c90\u3059\u308b\u5834\u5408\u306f\u3001\u4e8b\u524d\u306b<code>ToLower()<\/code>\u3084<code>ToUpper()<\/code>\u3067\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u3092\u7d71\u4e00\u3059\u308b\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u3092\u7d71\u4e00\u3057\u3066\u304b\u3089switch-case\u3067\u6bd4\u8f03\u3059\u308b\u5b89\u5168\u306a\u30d1\u30bf\u30fc\u30f3\nstring userInput = \"APPROVED\"; \/\/ \u5916\u90e8\u304b\u3089\u6765\u305f\u5024\n\nswitch (userInput.ToLower())  \/\/ \u5c0f\u6587\u5b57\u306b\u7d71\u4e00\u3057\u3066\u304b\u3089\u6bd4\u8f03\n{\n    case \"approved\":\n        Console.WriteLine(\"\u627f\u8a8d\u6e08\u307f\");\n        break;\n    case \"pending\":\n        Console.WriteLine(\"\u4fdd\u7559\u4e2d\");\n        break;\n    default:\n        Console.WriteLine(\"\u4e0d\u660e\u306a\u30b9\u30c6\u30fc\u30bf\u30b9\");\n        break;\n}<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4-1. \u6587\u5b57\u5217switch-case\u306e\u5b9f\u52d9\u6d3b\u7528\u4f8b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3067\u6587\u5b57\u5217switch-case\u304c\u6d3b\u8e8d\u3059\u308b\u4ee3\u8868\u7684\u306a\u30b7\u30fc\u30f3\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>API\u30b3\u30de\u30f3\u30c9\u306e\u632f\u308a\u5206\u3051<\/strong>\uff1aHTTP\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u7a2e\u5225\uff08\"create\", \"update\", \"delete\"\uff09\u3092\u5206\u5c90<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u696d\u7a2e\u5225\u30fb\u90e8\u9580\u5225\u306e\u51e6\u7406<\/strong>\uff1a\u9867\u5ba2\u306e\u696d\u7a2e\u30b3\u30fc\u30c9\uff08\"manufacturing\", \"retail\", \"service\"\uff09\u3067\u7570\u306a\u308b\u5e33\u7968\u3092\u751f\u6210<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u8a00\u8a9e\u5207\u308a\u66ff\u3048<\/strong>\uff1a\u30ed\u30b1\u30fc\u30eb\u6587\u5b57\u5217\uff08\"ja\", \"en\", \"zh\"\uff09\u3067UI\u30c6\u30ad\u30b9\u30c8\u3092\u5207\u308a\u66ff\u3048<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u306e\u5224\u5225<\/strong>\uff1aAPI\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u6587\u5b57\u5217\uff08\"AUTH_ERROR\", \"NOT_FOUND\"\u7b49\uff09\u3067\u9069\u5207\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u6a29\u9650\u30ec\u30d9\u30eb\u306e\u5224\u5b9a<\/strong>\uff1a\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb\u6587\u5b57\u5217\uff08\"admin\", \"manager\", \"viewer\"\uff09\u3067\u30a2\u30af\u30bb\u30b9\u5236\u5fa1<\/span><\/div>\n\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u6587\u5b57\u5217switch-case\u306f\u3001\u5916\u90e8API\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u6765\u305f\u5024\u3092\u305d\u306e\u307e\u307e\u4f7f\u3044\u305f\u3044\u3068\u304d\u306b\u4fbf\u5229\u3067\u3059\u3002\u305f\u3060\u3057\u5165\u529b\u5024\u3092\u4fe1\u983c\u3057\u3059\u304e\u306a\u3044\u3088\u3046\u3001default\u30b1\u30fc\u30b9\u3067\u300c\u60f3\u5b9a\u5916\u306e\u5024\u300d\u3092\u5fc5\u305a\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3059\u308b\u8a2d\u8a08\u304c\u5b89\u5168\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>case-sensitive\uff08\u30b1\u30fc\u30b9\u30bb\u30f3\u30b7\u30c6\u30a3\u30d6\uff09<\/strong>\uff1a\u6587\u5b57\u306e\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3059\u308b\u3053\u3068\u3002C#\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067case-sensitive\u3067\u3059\u3002\"Apple\"\u3068\"apple\"\u306f\u7570\u306a\u308b\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002switch-case\u3067\u5916\u90e8\u5165\u529b\u3092\u6271\u3046\u969b\u306f\u3001\u3053\u306e\u6027\u8cea\u3092\u5e38\u306b\u610f\u8b58\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-05\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">05<\/span>\n  <span class=\"section-label\" style=\"display:block;\">MULTIPLE CASES<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u8907\u6570\u6761\u4ef6\u30921\u3064\u306ecase\u306b\u307e\u3068\u3081\u308b\u65b9\u6cd5<\/span>\n  <span class=\"section-desc\">\u540c\u3058\u51e6\u7406\u3092\u8907\u6570\u306e\u5024\u3067\u5171\u6709\u3059\u308b\u30d1\u30bf\u30fc\u30f3<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u300cA\u306e\u5024\u3067\u3082B\u306e\u5024\u3067\u3082\u3001\u540c\u3058\u51e6\u7406\u3092\u5b9f\u884c\u3057\u305f\u3044\u300d\u3068\u3044\u3046\u5834\u9762\u306f\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3067\u983b\u7e41\u306b\u767a\u751f\u3057\u307e\u3059\u3002C#\u3067\u306f\u8907\u6570\u306ecase\u30e9\u30d9\u30eb\u3092\u9023\u7d9a\u3057\u3066\u66f8\u304f\u3053\u3068\u3067\u3001\u3053\u308c\u3092\u7c21\u6f54\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u8907\u6570\u306ecase\u30e9\u30d9\u30eb\u3067\u540c\u3058\u51e6\u7406\u3092\u5171\u6709\u3059\u308b\u30d1\u30bf\u30fc\u30f3\nstring paymentMethod = \"paypay\";\n\nswitch (paymentMethod)\n{\n    case \"credit_card\":\n    case \"debit_card\":\n        Console.WriteLine(\"\u30ab\u30fc\u30c9\u6c7a\u6e08\uff1a\u624b\u6570\u65993%\u52a0\u7b97\");\n        ApplyCardFee(3);\n        break;\n\n    case \"paypay\":\n    case \"line_pay\":\n    case \"merpay\":\n        Console.WriteLine(\"QR\u30b3\u30fc\u30c9\u6c7a\u6e08\uff1a\u624b\u6570\u6599\u306a\u3057\");\n        break;\n\n    case \"bank_transfer\":\n        Console.WriteLine(\"\u9280\u884c\u632f\u8fbc\uff1a3\u55b6\u696d\u65e5\u3067\u78ba\u8a8d\");\n        break;\n\n    default:\n        Console.WriteLine(\"\u4e0d\u660e\u306a\u6c7a\u6e08\u65b9\u6cd5\");\n        break;\n}\n\/\/ \u51fa\u529b: QR\u30b3\u30fc\u30c9\u6c7a\u6e08\uff1a\u624b\u6570\u6599\u306a\u3057<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8907\u6570\u306ecase\u30e9\u30d9\u30eb\u3092\u4e26\u3079\u308b\u3068\u304d\u3001\u5404case\u306b\u306fbreak\u3082\u30b3\u30fc\u30c9\u3082\u66f8\u304b\u305a\u3001<strong>\u6700\u5f8c\u306ecase\u30e9\u30d9\u30eb\u306e\u76f4\u5f8c\u306b\u51e6\u7406\u3068break\u3092\u66f8\u304f<\/strong>\u5f62\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u304cC#\u3067\u8a31\u53ef\u3055\u308c\u308b\u552f\u4e00\u306e\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">\u9023\u7d9a\u3059\u308bcase\u30e9\u30d9\u30eb\u306e\u66f8\u304d\u65b9\u306e\u30b3\u30c4<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u8907\u6570\u6761\u4ef6\u3092\u307e\u3068\u3081\u308b\u5834\u5408\u3001\u4f3c\u305f\u30b0\u30eb\u30fc\u30d7\u306f\u307e\u3068\u3081\u3066\u66f8\u304d\u3001\u30b0\u30eb\u30fc\u30d7\u9593\u306b\u306f\u7a7a\u884c\u3092\u5165\u308c\u308b\u3068\u8aad\u307f\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002\u300c\u30af\u30ec\u30b8\u30c3\u30c8\u7cfb\u300d\u300cQR\u30b3\u30fc\u30c9\u7cfb\u300d\u300c\u9280\u884c\u632f\u8fbc\u300d\u306e\u3088\u3046\u306b\u30b0\u30eb\u30fc\u30d7\u5316\u3059\u308b\u3068\u3001\u30b3\u30fc\u30c9\u304c\u696d\u52d9\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u3088\u3046\u306b\u8aad\u3081\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5-1. \u5b63\u7bc0\u30fb\u671f\u9593\u306b\u3088\u308b\u30b0\u30eb\u30fc\u30d7\u5206\u5c90\u306e\u4f8b<\/h3>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u6708\u6b21\u51e6\u7406\u306e\u30b0\u30eb\u30fc\u30d7\u5206\u5c90\uff08Q1\u301cQ4\u5bfe\u5fdc\uff09\nint month = DateTime.Now.Month;\nstring quarter;\n\nswitch (month)\n{\n    case 1:\n    case 2:\n    case 3:\n        quarter = \"Q1\uff081\u301c3\u6708\uff09\";\n        RunQ1Report();\n        break;\n    case 4:\n    case 5:\n    case 6:\n        quarter = \"Q2\uff084\u301c6\u6708\uff09\";\n        RunQ2Report();\n        break;\n    case 7:\n    case 8:\n    case 9:\n        quarter = \"Q3\uff087\u301c9\u6708\uff09\";\n        RunQ3Report();\n        break;\n    default:\n        quarter = \"Q4\uff0810\u301c12\u6708\uff09\";\n        RunQ4Report();\n        break;\n}\nConsole.WriteLine($\"\u73fe\u5728\u306e\u56db\u534a\u671f: {quarter}\");<\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u56db\u534a\u671f\u5225\u306e\u51e6\u7406\u5206\u5c90\u306f\u3001\u8ca1\u52d9\u30b7\u30b9\u30c6\u30e0\u3084\u55b6\u696d\u7ba1\u7406\u30c4\u30fc\u30eb\u3067\u5fc5\u305a\u3068\u8a00\u3063\u3066\u3044\u3044\u307b\u3069\u767b\u5834\u3057\u307e\u3059\u3002switch-case\u3067\u66f8\u304f\u3068\u3001\u300c\u3069\u306e\u6708\u304c\u3069\u306eQ\u300d\u304b\u304c\u4e00\u76ee\u77ad\u7136\u306b\u306a\u308a\u3001\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u304c\u683c\u6bb5\u306b\u697d\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-06\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">06<\/span>\n  <span class=\"section-label\" style=\"display:block;\">DEFAULT CASE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">default\u30b1\u30fc\u30b9\u306e\u91cd\u8981\u6027\u3068\u5b89\u5168\u306a\u8a2d\u8a08<\/span>\n  <span class=\"section-desc\">\u60f3\u5b9a\u5916\u306e\u5165\u529b\u3092\u5b88\u308b\u9632\u885b\u7684\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u5b9f\u8df5<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">switch-case\u6587\u306edefault\u30b1\u30fc\u30b9\u306f\u7701\u7565\u53ef\u80fd\u3067\u3059\u304c\u3001<strong>\u5b9f\u52d9\u3067\u306f\u5fc5\u305a\u66f8\u304f\u3079\u304d<\/strong>\u3067\u3059\u3002default\u304c\u306a\u3044\u3068\u3001\u60f3\u5b9a\u5916\u306e\u5024\u304c\u5165\u529b\u3055\u308c\u305f\u3068\u304d\u306b\u4f55\u3082\u8d77\u304d\u305a\u3001\u30d0\u30b0\u306e\u539f\u56e0\u304c\u7279\u5b9a\u3057\u306b\u304f\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u9632\u885b\u7684\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\uff08Defensive Programming\uff09<\/strong>\uff1a\u4e88\u671f\u3057\u306a\u3044\u5165\u529b\u3084\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3082\u3001\u30b7\u30b9\u30c6\u30e0\u304c\u5b89\u5168\u306b\u52d5\u4f5c\u3059\u308b\u3088\u3046\u8a2d\u8a08\u3059\u308b\u8003\u3048\u65b9\u3002switch-case\u306edefault\u30b1\u30fc\u30b9\u3067\u30ed\u30b0\u3092\u6b8b\u3057\u305f\u308a\u4f8b\u5916\u3092\u30b9\u30ed\u30fc\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3001\u9632\u885b\u7684\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u5b9f\u8df5\u4f8b\u306e\u4e00\u3064\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ default\u30b1\u30fc\u30b9\u3092\u6d3b\u7528\u3057\u305f\u5b89\u5168\u306a\u8a2d\u8a08\nstring userRole = GetUserRoleFromDatabase();\n\nswitch (userRole)\n{\n    case \"admin\":\n        ShowAdminDashboard();\n        break;\n    case \"manager\":\n        ShowManagerDashboard();\n        break;\n    case \"viewer\":\n        ShowReadOnlyView();\n        break;\n    default:\n        \/\/ \u60f3\u5b9a\u5916\u306e\u30ed\u30fc\u30eb\u306f\u30ed\u30b0\u306b\u8a18\u9332\u3057\u3066\u4f8b\u5916\u3092\u30b9\u30ed\u30fc\n        Logger.Error($\"\u672a\u5b9a\u7fa9\u306e\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb: {userRole} - UserID: {currentUserId}\");\n        throw new InvalidOperationException($\"\u672a\u30b5\u30dd\u30fc\u30c8\u306e\u30ed\u30fc\u30eb: {userRole}\");\n}<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">default\u30b1\u30fc\u30b9\u3067\u4f8b\u5916\u3092\u30b9\u30ed\u30fc\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u3082\u91cd\u8981\u3067\u3059\u3002\u3082\u3057\u4f55\u8005\u304b\u304c\u4e0d\u6b63\u306a\u30ed\u30fc\u30eb\u6587\u5b57\u5217\u3092\u6ce8\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u5834\u5408\u3001\u3053\u306e\u8a2d\u8a08\u3067\u3042\u308c\u3070\u30b7\u30b9\u30c6\u30e0\u304c\u7570\u5e38\u3092\u691c\u77e5\u30fb\u8a18\u9332\u3057\u3066\u51e6\u7406\u3092\u505c\u6b62\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">default\u306a\u3057\u306f\u300c\u30b5\u30a4\u30ec\u30f3\u30c8\u969c\u5bb3\u300d\u306e\u6e29\u5e8a<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">default\u30b1\u30fc\u30b9\u3092\u66f8\u304b\u306a\u3044\u5834\u5408\u3001\u60f3\u5b9a\u5916\u306e\u5024\u304c\u6765\u3066\u3082\u4f55\u3082\u8d77\u304d\u307e\u305b\u3093\u3002\u300c\u306a\u305c\u304b\u51e6\u7406\u304c\u30b9\u30ad\u30c3\u30d7\u3055\u308c\u308b\u300d\u300c\u30c7\u30fc\u30bf\u304c\u66f4\u65b0\u3055\u308c\u306a\u3044\u300d\u3068\u3044\u3063\u305f\u539f\u56e0\u4e0d\u660e\u306e\u30d0\u30b0\u306b\u767a\u5c55\u3057\u3084\u3059\u3044\u3067\u3059\u3002\u5b9f\u52d9\u30b3\u30fc\u30c9\u3067\u306f\u5fc5\u305adefault\u3092\u66f8\u304d\u3001\u30ed\u30b0\u51fa\u529b\u304b\u4f8b\u5916\u30b9\u30ed\u30fc\u3067\u554f\u984c\u3092\u53ef\u8996\u5316\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6-1. default\u306e\u914d\u7f6e\u4f4d\u7f6e\u306b\u3064\u3044\u3066<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u3067\u306fdefault\u30b1\u30fc\u30b9\u306f<strong>switch\u6587\u306e\u672b\u5c3e\u306b\u66f8\u304f\u306e\u304c\u4e00\u822c\u7684<\/strong>\u3067\u3059\u304c\u3001\u69cb\u6587\u4e0a\u306f\u4e2d\u9593\u3084\u5148\u982d\u306b\u3082\u7f6e\u3051\u307e\u3059\u3002\u305f\u3060\u3057\u53ef\u8aad\u6027\u306e\u89b3\u70b9\u304b\u3089\u3001\u672b\u5c3e\u63a8\u5968\u3067\u3059\u3002\u307e\u305f\u3001default\u306f\u5fc5\u305a1\u3064\u3060\u3051\u66f8\u3051\u307e\u3059\uff082\u3064\u66f8\u304f\u3068\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\uff09\u3002<\/p>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">default\u306e\u4f7f\u3044\u5206\u3051\u30d1\u30bf\u30fc\u30f33\u7a2e<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u2460\u8efd\u5fae\u306a\u5834\u5408\u306f\u30ed\u30b0\u3092\u6b8b\u3057\u3066\u30c7\u30d5\u30a9\u30eb\u30c8\u52d5\u4f5c\uff08\u901a\u5e38\u6599\u91d1\u3092\u9069\u7528\u306a\u3069\uff09\u3001\u2461\u91cd\u5927\u306a\u5834\u5408\u306f\u4f8b\u5916\u3092\u30b9\u30ed\u30fc\u3001\u2462\u30c6\u30b9\u30c8\u74b0\u5883\u3067\u306f Console.Writeline\u3067\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u51fa\u529b\u2014\u2014\u3053\u306e3\u30d1\u30bf\u30fc\u30f3\u3092\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u4f7f\u3044\u5206\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-07\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">07<\/span>\n  <span class=\"section-label\" style=\"display:block;\">SWITCH EXPRESSION<\/span>\n  <span class=\"section-title\" style=\"display:block;\">C# 8.0\u4ee5\u964d\u306eswitch\u5f0f\uff08switch expression\uff09<\/span>\n  <span class=\"section-desc\">\u65e7\u6765\u306eswitch\u6587\u3088\u308a\u3082\u7c21\u6f54\u306b\u66f8\u3051\u308b\u65b0\u3057\u3044\u69cb\u6587<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">C# 8.0\uff082019\u5e74\u30ea\u30ea\u30fc\u30b9\uff09\u304b\u3089\u3001<strong>switch\u5f0f\uff08switch expression\uff09<\/strong>\u3068\u3044\u3046\u65b0\u3057\u3044\u69cb\u6587\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u65e7\u6765\u306eswitch\u6587\u3068\u6bd4\u3079\u3066\u3001\u3088\u308a\u7c21\u6f54\u3067\u30a8\u30ec\u30ac\u30f3\u30c8\u306a\u66f8\u304d\u65b9\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>switch\u5f0f\uff08switch expression\uff09<\/strong>\uff1aC# 8.0\u3067\u8ffd\u52a0\u3055\u308c\u305f\u69cb\u6587\u3002\u65e7\u6765\u306eswitch\u300c\u6587\u300d\u306f\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u304c\u3001switch\u300c\u5f0f\u300d\u306f\u5024\u3092\u8fd4\u3059\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002\u5909\u6570\u3078\u306e\u4ee3\u5165\u3084\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u3068\u3057\u3066\u76f4\u63a5\u4f7f\u3048\u307e\u3059\u3002Java\u306eswitch expression\u3068\u540c\u69d8\u306e\u6982\u5ff5\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">7-1. switch\u6587\u3068switch\u5f0f\u306e\u66f8\u304d\u6bd4\u3079<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u3058\u30ed\u30b8\u30c3\u30af\u3092\u3001\u65e7\u6765\u306eswitch\u6587\u3068switch\u5f0f\u3067\u66f8\u304d\u6bd4\u3079\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u65e7\u6765\u306eswitch\u6587\uff08C# 8.0\u4ee5\u524d\uff09\nstring discountOld;\nint memberLevel = 2;\n\nswitch (memberLevel)\n{\n    case 1: discountOld = \"20%\"; break;\n    case 2: discountOld = \"10%\"; break;\n    case 3: discountOld = \"5%\";  break;\n    default: discountOld = \"0%\"; break;\n}\nConsole.WriteLine($\"\u5272\u5f15: {discountOld}\");<\/pre>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ C# 8.0\u4ee5\u964d\u306eswitch\u5f0f\nint memberLevel = 2;\n\nstring discount = memberLevel switch\n{\n    1 => \"20%\",\n    2 => \"10%\",\n    3 => \"5%\",\n    _ => \"0%\"\n};\nConsole.WriteLine($\"\u5272\u5f15: {discount}\");\n\/\/ \u51fa\u529b: \u5272\u5f15: 10%<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">switch\u5f0f\u306e\u7279\u5fb4\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u5909\u6570\u540d\u3092\u5148\u306b\u66f8\u304f<\/strong>\uff1a<code>memberLevel switch { ... }<\/code>\u306e\u5f62\u5f0f<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>case\u30ad\u30fc\u30ef\u30fc\u30c9\u4e0d\u8981<\/strong>\uff1a\u5024\u3092\u76f4\u63a5\u66f8\u3044\u3066<code>=&gt;<\/code>\u3067\u7d50\u679c\u3092\u6307\u5b9a<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>break\u304c\u4e0d\u8981<\/strong>\uff1a\u5404\u30b1\u30fc\u30b9\u306e\u672b\u5c3e\u306f<code>,<\/code>\uff08\u30ab\u30f3\u30de\uff09\u3067\u533a\u5207\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>_\u304cdefault\u306b\u76f8\u5f53<\/strong>\uff1a\u30a2\u30f3\u30c0\u30fc\u30b9\u30b3\u30a2<code>_<\/code>\u304c\u3059\u3079\u3066\u306e\u30b1\u30fc\u30b9\u306b\u30de\u30c3\u30c1\uff08\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u30d1\u30bf\u30fc\u30f3\uff09<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u5024\u3092\u76f4\u63a5\u8fd4\u305b\u308b<\/strong>\uff1a\u5909\u6570\u306b\u4ee3\u5165\u3057\u305f\u308a\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u3068\u3057\u3066\u76f4\u63a5\u4f7f\u3048\u308b<\/span><\/div>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">7-2. when\u30ad\u30fc\u30ef\u30fc\u30c9\u306b\u3088\u308b\u6761\u4ef6\u4ed8\u304d\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">switch\u5f0f\u3067\u306f<code>when<\/code>\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u3001\u5024\u306e\u7bc4\u56f2\u6307\u5b9a\u306a\u3069\u3001\u3088\u308a\u8907\u96d1\u306a\u6761\u4ef6\u3092\u66f8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ when\u3092\u4f7f\u3063\u305f\u7bc4\u56f2\u6307\u5b9a\u30d1\u30bf\u30fc\u30f3\uff08C# 9.0\u4ee5\u964d\u306e\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\uff09\nint score = 85;\n\nstring grade = score switch\n{\n    >= 90 => \"S\u8a55\u4fa1\uff1a\u512a\u79c0\",\n    >= 80 => \"A\u8a55\u4fa1\uff1a\u826f\u597d\",\n    >= 70 => \"B\u8a55\u4fa1\uff1a\u6a19\u6e96\",\n    >= 60 => \"C\u8a55\u4fa1\uff1a\u8981\u6539\u5584\",\n    _      => \"D\u8a55\u4fa1\uff1a\u8981\u30b5\u30dd\u30fc\u30c8\"\n};\nConsole.WriteLine(grade);\n\/\/ \u51fa\u529b: A\u8a55\u4fa1\uff1a\u826f\u597d<\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">C# 9.0\u4ee5\u964d\u3067\u306f<code>&gt;=<\/code>\u306e\u3088\u3046\u306a\u95a2\u4fc2\u6f14\u7b97\u5b50\u3082\u30d1\u30bf\u30fc\u30f3\u3068\u3057\u3066\u76f4\u63a5\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u300c\u7bc4\u56f2\u3067\u5206\u5c90\u3057\u305f\u3044\u3051\u3069switch-case\u304c\u4f7f\u3048\u306a\u3044\u300d\u3068\u3044\u3046\u5236\u9650\u304c\u307b\u307c\u89e3\u6d88\u3055\u308c\u307e\u3057\u305f\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">switch\u5f0f\u306f\u3044\u3064\u4f7f\u3046\u3079\u304d\u304b<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">switch\u5f0f\u306f\u300c\u3042\u308b\u5024\u304b\u3089\u5225\u306e\u5024\u3092\u5c0e\u51fa\u3059\u308b\u300d\uff08\u5024\u306e\u5909\u63db\u30fb\u30de\u30c3\u30d4\u30f3\u30b0\uff09\u306b\u6700\u9069\u3067\u3059\u3002\u8907\u6570\u306e\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\uff08\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076\u3001\u30ed\u30b0\u3092\u66f8\u304f\u3001\u72b6\u614b\u3092\u5909\u3048\u308b\uff09\u30b1\u30fc\u30b9\u3067\u306f\u3001\u65e7\u6765\u306eswitch\u6587\u306e\u307b\u3046\u304c\u30b3\u30fc\u30c9\u306e\u610f\u56f3\u304c\u660e\u78ba\u3067\u3059\u3002\u300c\u5909\u63db\u306fswitch\u5f0f\u3001\u624b\u7d9a\u304d\u306fswitch\u6587\u300d\u3068\u899a\u3048\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-08\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">08<\/span>\n  <span class=\"section-label\" style=\"display:block;\">SWITCH VS IF-ELSE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">switch vs if-else \u306e\u4f7f\u3044\u5206\u3051\u5224\u65ad\u57fa\u6e96<\/span>\n  <span class=\"section-desc\">\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u6700\u9069\u306a\u6761\u4ef6\u5206\u5c90\u69cb\u6587\u3092\u9078\u3076<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u300cswitch-case\u304bif-else\u304b\u300d\u3068\u3044\u3046\u9078\u629e\u306f\u3001C#\u958b\u767a\u8005\u304c\u65e5\u5e38\u7684\u306b\u76f4\u9762\u3059\u308b\u5224\u65ad\u3067\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u7279\u6027\u3092\u7406\u89e3\u3057\u3066\u3001\u9069\u5207\u306b\u4f7f\u3044\u5206\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\">\u6bd4\u8f03\u5bfe\u8c61\u306e\u5909\u6570\u306f1\u3064\uff1f<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u5b9a\u6570\u5024\u3068\u4e00\u81f4\u6bd4\u8f03\uff1f<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u9078\u629e\u80a2\u306f4\u3064\u4ee5\u4e0a\uff1f<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">switch-case\u3092\u9078\u3076<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">if-else\u3092\u9078\u3076<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">8-1. switch\u3092\u9078\u3076\u3079\u304d\u30b1\u30fc\u30b9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306e\u3059\u3079\u3066\u306b\u5f53\u3066\u306f\u307e\u308b\u5834\u5408\u3001switch-case\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u540c\u3058\u5909\u6570\u306e\u5024\u3092<\/strong>\u8907\u6570\u306e\u5b9a\u6570\u5024\u3068\u6bd4\u8f03\u3057\u3066\u3044\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u6bd4\u8f03\u3059\u308b\u9078\u629e\u80a2\u304c4\u3064\u4ee5\u4e0a<\/strong>\u3042\u308b\uff083\u3064\u4ee5\u4e0b\u306a\u3089if-else\u3067\u3082\u5341\u5206\uff09<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u6574\u6570\u30fb\u6587\u5b57\u5217\u30fbenum<\/strong>\u306e\u3044\u305a\u308c\u304b\u3092\u4f7f\u3063\u3066\u3044\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u4eba\u306b<strong>\u300c\u3069\u306e\u5024\u306e\u3068\u304d\u3069\u306e\u51e6\u7406\u304b\u300d\u3092\u4e00\u89a7\u3067\u898b\u305b\u305f\u3044<\/strong><\/span><\/div>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">8-2. if-else\u3092\u9078\u3076\u3079\u304d\u30b1\u30fc\u30b9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306e\u3044\u305a\u308c\u304b\u306b\u5f53\u3066\u306f\u307e\u308b\u5834\u5408\u3001if-else\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><code>x &gt; 100<\/code>\u3084<code>name != null<\/code>\u306e\u3088\u3046\u306a<strong>\u7bc4\u56f2\u30fb\u8ad6\u7406\u6761\u4ef6<\/strong>\u304c\u5fc5\u8981<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u8907\u6570\u306e\u7570\u306a\u308b\u5909\u6570<\/strong>\u3092\u540c\u6642\u306b\u6761\u4ef6\u306b\u3057\u305f\u3044\uff08<code>if (a &gt; 0 &amp;&amp; b != null)<\/code>\u7b49\uff09<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>2\u301c3\u3064\u7a0b\u5ea6<\/strong>\u306e\u7c21\u5358\u306a\u5206\u5c90\uff08switch-case\u3092\u4f7f\u3046\u307b\u3069\u3067\u3082\u306a\u3044\uff09<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>null \u30c1\u30a7\u30c3\u30af<\/strong>\u3092\u542b\u3080\uff08switch-case\u3067\u306enull\u306f\u6271\u3044\u306b\u6ce8\u610f\u304c\u5fc5\u8981\uff09<\/span><\/div>\n\n<\/div>\n\n\n\n<table>\n<thead><tr><th>\u5224\u65ad\u57fa\u6e96<\/th><th>switch-case\u3092\u9078\u3076<\/th><th>if-else\u3092\u9078\u3076<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u6bd4\u8f03\u306e\u7a2e\u985e<\/td><td>\u5024\u306e\u4e00\u81f4\u6bd4\u8f03\u306e\u307f<\/td><td>\u7bc4\u56f2\u30fb\u8ad6\u7406\u5f0f\u30fb\u8907\u5408\u6761\u4ef6<\/td><\/tr>\n<tr><td>\u6bd4\u8f03\u5909\u6570\u306e\u6570<\/td><td>1\u5909\u6570<\/td><td>\u8907\u6570\u5909\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u53ef<\/td><\/tr>\n<tr><td>\u9078\u629e\u80a2\u306e\u6570<\/td><td>4\u3064\u4ee5\u4e0a<\/td><td>3\u3064\u4ee5\u4e0b<\/td><\/tr>\n<tr><td>\u30b3\u30fc\u30c9\u306e\u610f\u56f3<\/td><td>\u300c\u3053\u306e\u5909\u6570\u304c\u25ef\u25ef\u306e\u5024\u306a\u3089\u3070\u300d<\/td><td>\u300c\u3053\u306e\u6761\u4ef6\u304c\u6e80\u305f\u3055\u308c\u308b\u306a\u3089\u3070\u300d<\/td><\/tr>\n<tr><td>\u4fdd\u5b88\u6027<\/td><td>\u9078\u629e\u80a2\u306e\u8ffd\u52a0\u304c\u3057\u3084\u3059\u3044<\/td><td>\u6761\u4ef6\u304c\u5897\u3048\u308b\u3068\u30cd\u30b9\u30c8\u304c\u6df1\u304f\u306a\u308b<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u30d3\u30b8\u30cd\u30b9\u4e0a\u306e\u5224\u65ad\u30eb\u30fc\u30eb\u3092\u898b\u3066\u300c\u3053\u306e\u5024\u306a\u3089\u25ef\u25ef\u3001\u3053\u306e\u5024\u306a\u3089\u25ef\u25ef\u300d\u3068\u3044\u3046\u5f62\u306e\u696d\u52d9\u30ed\u30b8\u30c3\u30af\u306f\u3001\u307b\u307cswitch-case\u3067\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002\u9006\u306b\u300c\u3053\u306e\u91d1\u984d\u304c\u4e88\u7b97\u3092\u8d85\u3048\u305f\u5834\u5408\u304b\u3064\u8cac\u4efb\u8005\u306e\u627f\u8a8d\u304c\u306a\u3044\u5834\u5408\u300d\u306e\u3088\u3046\u306a\u8907\u5408\u6761\u4ef6\u306fif-else\u306e\u51fa\u756a\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-09\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">09<\/span>\n  <span class=\"section-label\" style=\"display:block;\">PRACTICAL USAGE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u5b9f\u8df5\u9069\u7528\u4f8b<\/span>\n  <span class=\"section-desc\">\u53d7\u6ce8\u30fb\u5728\u5eab\u30fb\u6a29\u9650\u7ba1\u7406\u306a\u3069\u5b9f\u52d9\u30b3\u30fc\u30c9\u3067\u306eswitch-case\u30d1\u30bf\u30fc\u30f3<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u3067\u306f\u3001\u5b9f\u969b\u306e\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3067switch-case\u304c\u3069\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\u304b\u30013\u3064\u306e\u5b9f\u8df5\u30d1\u30bf\u30fc\u30f3\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">9-1. \u53d7\u6ce8\u30b9\u30c6\u30fc\u30bf\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">EC\u30b5\u30a4\u30c8\u3084\u53d7\u767a\u6ce8\u30b7\u30b9\u30c6\u30e0\u3067\u5fc5\u9808\u3068\u306a\u308b\u3001\u6ce8\u6587\u30b9\u30c6\u30fc\u30bf\u30b9\u306b\u5fdc\u3058\u305f\u51e6\u7406\u306e\u632f\u308a\u5206\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u53d7\u6ce8\u30b9\u30c6\u30fc\u30bf\u30b9\u7ba1\u7406\uff1a\u30b9\u30c6\u30fc\u30bf\u30b9\u3054\u3068\u306e\u51e6\u7406\u632f\u308a\u5206\u3051\npublic class OrderProcessor\n{\n    public void ProcessOrder(Order order)\n    {\n        switch (order.Status)\n        {\n            case OrderStatus.Received:\n                SendOrderConfirmation(order);\n                NotifyWarehouse(order);\n                break;\n\n            case OrderStatus.Processing:\n                UpdateInventory(order);\n                break;\n\n            case OrderStatus.Shipped:\n                SendShippingNotification(order);\n                UpdateDeliveryTracking(order);\n                break;\n\n            case OrderStatus.Delivered:\n                SendDeliveryConfirmation(order);\n                RequestReview(order);\n                break;\n\n            case OrderStatus.Cancelled:\n                InitiateRefund(order);\n                RestoreInventory(order);\n                break;\n\n            default:\n                throw new InvalidOperationException(\n                    $\"\u672a\u5bfe\u5fdc\u306e\u30b9\u30c6\u30fc\u30bf\u30b9: {order.Status}\");\n        }\n    }\n}<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">9-2. \u6a29\u9650\u30ec\u30d9\u30eb\u306b\u3088\u308b\u30a2\u30af\u30bb\u30b9\u5236\u5fa1<\/h3>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u6a29\u9650\u30ec\u30d9\u30eb\u5225UI\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u8868\u793a\u5236\u5fa1\npublic class DashboardController\n{\n    public DashboardView GetDashboard(string userRole)\n    {\n        return userRole switch\n        {\n            \"admin\"     => new AdminDashboard(),\n            \"manager\"   => new ManagerDashboard(),\n            \"analyst\"   => new AnalystDashboard(),\n            \"viewer\"    => new ReadOnlyDashboard(),\n            _           => throw new UnauthorizedAccessException(\n                               $\"\u4e0d\u660e\u306a\u30ed\u30fc\u30eb: {userRole}\")\n        };\n    }\n}<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">switch\u5f0f\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u300c\u30ed\u30fc\u30eb\u306b\u5fdc\u3058\u305f\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059\u300d\u3068\u3044\u3046\u51e6\u7406\u304c1\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u53ce\u307e\u308a\u307e\u3057\u305f\u3002\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3067\u3082\u300c\u3069\u306e\u30ed\u30fc\u30eb\u304c\u3069\u306e\u753b\u9762\u3092\u898b\u308b\u304b\u300d\u304c\u4e00\u76ee\u77ad\u7136\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">9-3. \u8acb\u6c42\u66f8\u306e\u6d88\u8cbb\u7a0e\u7387\u8a08\u7b97\uff08\u8efd\u6e1b\u7a0e\u7387\u5bfe\u5fdc\uff09<\/h3>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ \u5546\u54c1\u30ab\u30c6\u30b4\u30ea\u5225\u306e\u6d88\u8cbb\u7a0e\u7387\u8a08\u7b97\npublic decimal GetTaxRate(ProductCategory category)\n{\n    return category switch\n    {\n        ProductCategory.Food          => 0.08m, \/\/ \u98df\u6599\u54c1\uff1a\u8efd\u6e1b\u7a0e\u73878%\n        ProductCategory.Newspaper     => 0.08m, \/\/ \u65b0\u805e\uff1a\u8efd\u6e1b\u7a0e\u73878%\n        ProductCategory.Alcohol       => 0.10m, \/\/ \u30a2\u30eb\u30b3\u30fc\u30eb\uff1a\u6a19\u6e96\u7a0e\u738710%\n        ProductCategory.Electronics   => 0.10m, \/\/ \u96fb\u5b50\u6a5f\u5668\uff1a\u6a19\u6e96\u7a0e\u738710%\n        ProductCategory.Services      => 0.10m, \/\/ \u30b5\u30fc\u30d3\u30b9\uff1a\u6a19\u6e96\u7a0e\u738710%\n        _ => throw new ArgumentException(\n                 $\"\u7a0e\u7387\u672a\u8a2d\u5b9a\u306e\u30ab\u30c6\u30b4\u30ea: {category}\")\n    };\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u3053\u306e\u6d88\u8cbb\u7a0e\u7387\u8a08\u7b97\u306e\u4f8b\u306f\u3001\u6cd5\u6539\u6b63\u304c\u3042\u3063\u305f\u3068\u304d\u306e\u5909\u66f4\u7bc4\u56f2\u304c\u660e\u78ba\u3068\u3044\u3046\u5229\u70b9\u3082\u3042\u308a\u307e\u3059\u3002switch-case\u3067\u307e\u3068\u3081\u3066\u304a\u3051\u3070\u300c\u8efd\u6e1b\u7a0e\u7387\u306e\u5bfe\u8c61\u304c\u5909\u308f\u3063\u305f\u5834\u5408\u306f\u3053\u3053\u3060\u3051\u5909\u66f4\u300d\u3068\u4e00\u7b87\u6240\u3067\u306e\u7ba1\u7406\u304c\u53ef\u80fd\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">\u696d\u52d9\u30eb\u30fc\u30eb\u306e\u300c\u30b3\u30fc\u30c9\u5316\u300d\u306bswitch-case\u304c\u9069\u3057\u3066\u3044\u308b\u7406\u7531<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u696d\u52d9\u30eb\u30fc\u30eb\u306f\u300c\u25ef\u25ef\u306e\u3068\u304d\u306f\u25ef\u25ef\u300d\u3068\u3044\u3046\u5bfe\u5fdc\u8868\u306e\u5f62\u3092\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u591a\u304f\u3001switch-case\u306e\u69cb\u9020\u3068\u81ea\u7136\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3055\u308c\u307e\u3059\u3002\u696d\u52d9\u4ed5\u69d8\u66f8\u3092\u305d\u306e\u307e\u307e\u30b3\u30fc\u30c9\u306b\u843d\u3068\u3057\u8fbc\u3081\u308b\u70b9\u3067\u3001switch-case\u306f\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u4ed5\u69d8\u30ec\u30d3\u30e5\u30fc\u306b\u3082\u9069\u3057\u305f\u69cb\u6587\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-10\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">10<\/span>\n  <span class=\"section-label\" style=\"display:block;\">ERRORS & FIXES<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u3068\u5bfe\u51e6\u6cd5<\/span>\n  <span class=\"section-desc\">switch-case\u5b9f\u88c5\u6642\u306b\u306f\u307e\u308a\u3084\u3059\u3044\u30dd\u30a4\u30f3\u30c8\u3068\u89e3\u6c7a\u7b56<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u3067switch-case\u3092\u5b9f\u88c5\u3059\u308b\u3068\u304d\u3001\u521d\u5fc3\u8005\u304c\u9665\u308a\u3084\u3059\u3044\u30a8\u30e9\u30fc\u30d1\u30bf\u30fc\u30f3\u3068\u305d\u306e\u89e3\u6c7a\u7b56\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">10-1. \u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\uff1a\u5236\u5fa1\u304c\u6b21\u306ecase\u306b\u6d41\u308c\u308b<\/h3>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ NG: break\u304c\u629c\u3051\u3066\u3044\u308b\u3068\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\nswitch (value)\n{\n    case 1:\n        Console.WriteLine(\"one\");\n        \/\/ \u3053\u3053\u306bbreak\u304c\u306a\u3044 \u2192 \u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\n    case 2:\n        Console.WriteLine(\"two\");\n        break;\n}\n\n\/\/ OK: \u540c\u3058\u51e6\u7406\u3092\u307e\u3068\u3081\u305f\u3044\u306a\u3089\u3001case\u30e9\u30d9\u30eb\u3092\u9023\u7d9a\u3055\u305b\u308b\nswitch (value)\n{\n    case 1:\n    case 2:\n        Console.WriteLine(\"one or two\"); \/\/ 1\u3067\u30822\u3067\u3082\u3053\u306e\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u308b\n        break;\n}<\/pre>\n<\/div>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u300c\u5236\u5fa1\u306f1\u3064\u306e case \u53e5\u304b\u3089\u5225\u306e case \u53e5\u306b\u6d41\u308c\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u300d<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u3053\u306e\u30a8\u30e9\u30fc\u306fbreak\u6587\u306e\u4ed8\u3051\u5fd8\u308c\u304c\u539f\u56e0\u3067\u3059\u3002\u4e00\u65b9\u3001case\u30e9\u30d9\u30eb\u3092\u9023\u7d9a\u3057\u3066\u66f8\u304f\uff08case\u3068case\u306e\u9593\u306b\u30b3\u30fc\u30c9\u304c1\u884c\u3082\u306a\u3044\uff09\u5f62\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">10-2. \u6587\u5b57\u5217\u306enull\u53c2\u7167\u4f8b\u5916<\/h3>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ NG: string\u5909\u6570\u304cnull\u306e\u5834\u5408\u3001switch-case\u3067NullReferenceException\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\nstring status = GetStatusFromAPI(); \/\/ null\u304c\u8fd4\u3063\u3066\u304f\u308b\u304b\u3082\u3057\u308c\u306a\u3044\n\nswitch (status) \/\/ status\u304cnull\u3060\u3068NullReferenceException\n{\n    case \"active\": \/* ... *\/ break;\n    default: \/* ... *\/ break;\n}\n\n\/\/ OK: null \u30c1\u30a7\u30c3\u30af\u3092\u5148\u306b\u3059\u308b\nstring status = GetStatusFromAPI() ?? \"unknown\"; \/\/ null\u5408\u4f53\u6f14\u7b97\u5b50\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\n\nswitch (status)\n{\n    case \"active\": \/* ... *\/ break;\n    default: \/* ... *\/ break;\n}<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">10-3. switch\u5f0f\u3067default\u304c\u6f0f\u308c\u308b<\/h3>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.7;white-space:pre;\">\/\/ NG: _\uff08\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff09\u304c\u306a\u3044\u3068\u3001\u3069\u306e\u30b1\u30fc\u30b9\u306b\u3082\u30de\u30c3\u30c1\u3057\u306a\u3044\u5834\u5408\u306b\u4f8b\u5916\u304c\u767a\u751f\nstring result = status switch\n{\n    \"active\"   => \"\u6709\u52b9\",\n    \"inactive\" => \"\u7121\u52b9\",\n    \/\/ _ \u304c\u306a\u3044 \u2192 \"unknown\"\u306a\u3069\u306e\u3068\u304d MatchFailureException \u767a\u751f\n};\n\n\/\/ OK: \u5fc5\u305a _ \u3092\u8ffd\u52a0\u3059\u308b\nstring result = status switch\n{\n    \"active\"   => \"\u6709\u52b9\",\n    \"inactive\" => \"\u7121\u52b9\",\n    _          => \"\u4e0d\u660e\"  \/\/ \u5fc5\u9808\n};<\/pre>\n<\/div>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>break\u306e\u4ed8\u3051\u5fd8\u308c<\/strong>\uff1a\u5404case\u306e\u672b\u5c3e\u306bbreak\u3092\u66f8\u304f\uff08case\u30e9\u30d9\u30eb\u306e\u9023\u7d9a\u306f\u9664\u304f\uff09<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u6587\u5b57\u5217\u306enull\u5bfe\u7b56<\/strong>\uff1anull\u5408\u4f53\u6f14\u7b97\u5b50<code>??<\/code>\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u5148\u306b\u8a2d\u5b9a<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>switch\u5f0f\u306e\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9<\/strong>\uff1a<code>_<\/code>\u3092\u6700\u5f8c\u306b\u5fc5\u305a\u66f8\u304f<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306e\u4e0d\u4e00\u81f4<\/strong>\uff1a\u5916\u90e8\u5165\u529b\u306fToLower()\u3084ToUpper()\u3067\u7d71\u4e00\u3057\u3066\u304b\u3089\u6e21\u3059<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u578b\u306e\u4e0d\u4e00\u81f4<\/strong>\uff1aswitch(\u5909\u6570)\u306e\u5909\u6570\u578b\u3068case\u306e\u5024\u306e\u578b\u304c\u4e00\u81f4\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d<\/span><\/div>\n\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-11\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">11<\/span>\n  <span class=\"section-label\" style=\"display:block;\">CLAUDE CODE AUTOMATION<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Claude Code\u3067\u6761\u4ef6\u5206\u5c90\u30ed\u30b8\u30c3\u30af\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/span>\n  <span class=\"section-desc\">AI\u306b\u696d\u52d9\u30eb\u30fc\u30eb\u3092\u6e21\u3057\u3066\u3001switch-case\u30b3\u30fc\u30c9\u3092\u5373\u5ea7\u306b\u751f\u6210\u3055\u305b\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u307e\u3067switch-case\u306e\u6280\u8853\u7684\u306a\u89e3\u8aac\u3092\u3057\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u5b9f\u306f\u3053\u308c\u3089\u306e\u30b3\u30fc\u30c9\u3092<strong>\u4e00\u884c\u3082\u624b\u66f8\u304d\u305b\u305a\u306b\u751f\u6210\u3067\u304d\u308b<\/strong>\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u304c<strong>Claude Code<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Code\u306f\u3001Anthropic\u304c\u958b\u767a\u3057\u305fAI\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u3067\u3059\u3002\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3082\u3001\u696d\u52d9\u30eb\u30fc\u30eb\u3092\u65e5\u672c\u8a9e\u3067\u8aac\u660e\u3059\u308b\u3060\u3051\u3067\u3001\u5bfe\u5fdc\u3059\u308bC#\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u79c1\u304c\u5b9f\u969b\u306b\u5f0a\u793e\u306e\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3057\u305f\u3068\u304d\u3001\u53d7\u6ce8\u30b9\u30c6\u30fc\u30bf\u30b9\u7ba1\u7406\u306eswitch-case\u8a2d\u8a08\u306fClaude Code\u306b\u4efb\u305b\u307e\u3057\u305f\u3002\u300c\u53d7\u6ce8\u30b9\u30c6\u30fc\u30bf\u30b9\u306f\u53d7\u4ed8\u30fb\u51e6\u7406\u4e2d\u30fb\u767a\u9001\u6e08\u30fb\u914d\u9054\u6e08\u30fb\u30ad\u30e3\u30f3\u30bb\u30eb\u306e5\u6bb5\u968e\u3067\u3001\u5404\u30b9\u30c6\u30fc\u30bf\u30b9\u3067\u7570\u306a\u308b\u901a\u77e5\u3092\u9001\u308a\u305f\u3044\u300d\u3068\u4f1d\u3048\u308b\u3060\u3051\u3067\u3001\u5b89\u5168\u306aC#\u30b3\u30fc\u30c9\u3068\u3001error\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u307e\u3067\u542b\u3081\u305f\u30b3\u30fc\u30c9\u304c\u51fa\u3066\u304d\u307e\u3057\u305f\u3002<\/div>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">Claude Code\u3078\u306e\u6307\u793a\u306f\u65e5\u672c\u8a9e\u3067\u66f8\u3051\u307e\u3059\u3002\u300cC#\u3067\u6708\u3054\u3068\u306e\u56db\u534a\u671f\u5224\u5b9a\u3092switch-case\u3067\u66f8\u3044\u3066\u300d\u300c\u6587\u5b57\u5217\u306e\u6ce8\u6587\u30b9\u30c6\u30fc\u30bf\u30b9\u3067\u306e\u5206\u5c90\u51e6\u7406\u3092\u3001null\u30c1\u30a7\u30c3\u30af\u3068default\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u4ed8\u304d\u3067\u5b9f\u88c5\u3057\u3066\u300d\u3068\u3044\u3063\u305f\u5f62\u3067\u3001\u696d\u52d9\u306e\u6587\u8108\u3092\u305d\u306e\u307e\u307e\u6e21\u305b\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">11-1. Claude Code\u3078\u306e\u6307\u793a\u306e\u66f8\u304d\u65b9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Code\u306b\u52b9\u679c\u7684\u306b\u6307\u793a\u3092\u51fa\u3059\u305f\u3081\u306e\u30b3\u30c4\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"step-item\"><div class=\"step-num\">1<\/div><div class=\"step-content\"><strong>\u696d\u52d9\u30eb\u30fc\u30eb\u3092\u81ea\u7136\u8a00\u8a9e\u3067\u66f8\u304f<\/strong>\u300c\u4f1a\u54e1\u30e9\u30f3\u30af\u304c1\u306a\u308920%\u5272\u5f15\u30012\u306a\u308910%\u5272\u5f15\u30013\u306a\u30895%\u5272\u5f15\u3001\u305d\u308c\u4ee5\u5916\u306f\u5272\u5f15\u306a\u3057\u300d\u306e\u3088\u3046\u306b\u3001\u696d\u52d9\u4ed5\u69d8\u66f8\u306e\u8868\u73fe\u3092\u305d\u306e\u307e\u307e\u30b3\u30d4\u30da\u3057\u3066OK<\/div><\/div>\n<div class=\"step-item\"><div class=\"step-num\">2<\/div><div class=\"step-content\"><strong>\u5909\u6570\u540d\u30fb\u578b\u3092\u6307\u5b9a\u3059\u308b<\/strong>\u300c\u5909\u6570\u540d\u306fmemberLevel\u3001\u578b\u306fint\u3067\u300d\u300c\u6587\u5b57\u5217\u306eorderStatus\u3067\u5206\u5c90\u3057\u3066\u300d\u306e\u3088\u3046\u306b\u578b\u60c5\u5831\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3088\u308a\u6b63\u78ba\u306a\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u308b<\/div><\/div>\n<div class=\"step-item\"><div class=\"step-num\">3<\/div><div class=\"step-content\"><strong>\u5b89\u5168\u6027\u8981\u4ef6\u3092\u6dfb\u3048\u308b<\/strong>\u300cnull\u30c1\u30a7\u30c3\u30af\u3092\u542b\u3081\u3066\u300d\u300cdefault\u3067\u4f8b\u5916\u3092\u30b9\u30ed\u30fc\u3059\u308b\u8a2d\u8a08\u3067\u300d\u300c\u30ed\u30b0\u51fa\u529b\u3082\u5165\u308c\u3066\u300d\u3068\u4e00\u8a00\u6dfb\u3048\u308b\u3060\u3051\u3067\u9632\u885b\u7684\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u9069\u7528\u3055\u308c\u308b<\/div><\/div>\n<div class=\"step-item\"><div class=\"step-num\">4<\/div><div class=\"step-content\"><strong>switch\u5f0f\u304b\u6587\u304b\u3092\u6307\u5b9a\u3059\u308b<\/strong>\u300cC# 8.0\u306eswitch\u5f0f\u3067\u66f8\u3044\u3066\u300d\u300c\u5024\u3092\u5909\u6570\u306b\u4ee3\u5165\u3057\u305f\u3044\u306e\u3067switch\u5f0f\u3067\u300d\u3068\u65b0\u65e7\u306e\u69cb\u6587\u3092\u6307\u5b9a\u3067\u304d\u308b<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">11-2. Claude Code\u304c\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u306b\u4e0e\u3048\u308b\u4fa1\u5024<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">switch-case\u306b\u9650\u3089\u305a\u3001C#\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3051\u308bClaude Code\u306e\u771f\u306e\u4fa1\u5024\u306f<strong>\u300c\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u4f5c\u696d\u3092\u30bc\u30ed\u306b\u3059\u308b\u300d<\/strong>\u3053\u3068\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<strong>\u300c\u696d\u52d9\u30eb\u30fc\u30eb\u306e\u8a2d\u8a08\u306b\u96c6\u4e2d\u3067\u304d\u308b\u300d<\/strong>\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f93\u6765\u3001\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306e\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u306f\u300c\u696d\u52d9\u62c5\u5f53\u8005\u304c\u30eb\u30fc\u30eb\u3092\u6c7a\u3081\u308b \u2192 \u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u30b3\u30fc\u30c9\u306b\u7ffb\u8a33\u3059\u308b\u300d\u3068\u3044\u30462\u6bb5\u968e\u306e\u7ffb\u8a33\u30d7\u30ed\u30bb\u30b9\u3067\u3057\u305f\u3002Claude Code\u3092\u4f7f\u3048\u3070\u3001\u696d\u52d9\u62c5\u5f53\u8005\u304c\u81ea\u5206\u3067\u30b3\u30fc\u30c9\u3092\u751f\u6210\u30fb\u78ba\u8a8d\u3067\u304d\u308b\u305f\u3081\u3001\u3053\u306e\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u304c\u89e3\u6d88\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u4ed5\u69d8\u5909\u66f4\u3092\u5373\u78ba\u8a8d<\/strong>\uff1a\u300c\u8efd\u6e1b\u7a0e\u7387\u306e\u5bfe\u8c61\u30ab\u30c6\u30b4\u30ea\u304c\u5909\u308f\u3063\u305f\u5834\u5408\u306e\u30b3\u30fc\u30c9\u3092\u51fa\u3057\u3066\u300d\u3068\u805e\u3051\u30705\u79d2\u3067\u30b3\u30fc\u30c9\u304c\u51fa\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u65e2\u5b58\u30b3\u30fc\u30c9\u306e\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0<\/strong>\uff1a\u300c\u3053\u306eif-else\u3092switch\u5f0f\u3067\u66f8\u304d\u76f4\u3057\u3066\u300d\u3067\u30b3\u30fc\u30c9\u306e\u6700\u9069\u5316\u3092\u81ea\u52d5\u5316<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u81ea\u52d5\u751f\u6210<\/strong>\uff1a\u300c\u4e0a\u8a18\u306eswitch-case\u306b\u5bfe\u3059\u308b\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3092\u66f8\u3044\u3066\u300d\u3067\u54c1\u8cea\u62c5\u4fdd\u3082\u52b9\u7387\u5316<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u30a8\u30e9\u30fc\u539f\u56e0\u306e\u8a3a\u65ad<\/strong>\uff1a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u305d\u306e\u307e\u307e\u8cbc\u308a\u4ed8\u3051\u308b\u3068\u3001\u539f\u56e0\u3068\u4fee\u6b63\u65b9\u6cd5\u3092\u6559\u3048\u3066\u304f\u308c\u308b<\/span><\/div>\n\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">AI\u9b3c\u7ba1\u7406\u3067\u306f\u3001Claude Code\u3092\u4e2d\u5fc3\u3068\u3057\u305f<strong>AI\u6d3b\u7528\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u901a\u3058\u3066\u3001\u30a8\u30f3\u30b8\u30cb\u30a2\u4e0d\u5728\u306e\u7d44\u7e54\u3067\u3082\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3092\u81ea\u8d70\u3055\u305b\u308b<\/strong>\u652f\u63f4\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002C#\u306eswitch-case\u306e\u3088\u3046\u306a\u6280\u8853\u7684\u306a\u6982\u5ff5\u3082\u3001\u696d\u52d9\u62c5\u5f53\u8005\u304c\u7406\u89e3\u3057\u3066Claude Code\u306b\u9069\u5207\u306a\u6307\u793a\u3092\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u308b\u3053\u3068\u304c\u3001DX\u63a8\u9032\u306e\u51fa\u767a\u70b9\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u3067\u306eswitch-case\u8a2d\u8a08\u304b\u3089Claude Code\u306e\u696d\u52d9\u6d3b\u7528\u307e\u3067\u3001\u5fa1\u793e\u306eAI\u5c0e\u5165\u3092\u5b9f\u8df5\u30d9\u30fc\u30b9\u3067\u4f34\u8d70\u3057\u307e\u3059\u3002\u307e\u305a\u306f\u7121\u6599\u76f8\u8ac7\u3067\u3001\u73fe\u5728\u306e\u8ab2\u984c\u3092\u304a\u805e\u304b\u305b\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div style=\"background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);border-radius:16px;padding:36px 32px;margin:48px 0 16px;color:#fff;\">\n  <p style=\"font-size:13px;font-weight:700;color:#dc2626;letter-spacing:2px;margin:0 0 12px;\">NEXT STEP<\/p>\n  <p style=\"font-size:22px;font-weight:800;line-height:1.5;margin:0 0 20px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u3001\u3042\u306a\u305f\u306e\u30d3\u30b8\u30cd\u30b9\u3067<br>\u5b9f\u8df5\u3057\u3066\u307f\u307e\u305b\u3093\u304b\uff1f<\/p>\n  <div style=\"background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);border-radius:12px;padding:24px;max-width:560px;margin:0 auto;\">\n    <p style=\"font-size:13px;color:#dc2626;font-weight:700;margin:0 0 8px;\">AI\u6d3b\u7528\u3092\u81ea\u793e\u3067\u56de\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u305f\u3044\u65b9\u3078<\/p>\n    <p style=\"font-size:20px;font-weight:800;margin:0 0 12px;\">AI\u9b3c\u7ba1\u7406<\/p>\n    <p style=\"font-size:14px;color:rgba(255,255,255,0.75);margin:0 0 20px;line-height:1.7;\">Claude Code\u30fbCowork\u5c0e\u5165\u652f\u63f4\u304b\u3089\u696d\u52d9\u8a2d\u8a08\u30fb\u793e\u5185\u6d78\u900f\u307e\u3067\u5b9f\u8df5\u30d9\u30fc\u30b9\u3067\u4f34\u8d70\u3002\u300c\u81ea\u793e\u3067\u56de\u305b\u308b\u7d44\u7e54\u300d\u309290\u65e5\u3067\u4f5c\u308b\u7d4c\u55b6\u8005\u5411\u3051\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3002<\/p>\n    <div style=\"text-align:center;\">\n      <a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&utm_medium=article&utm_campaign=cc-csharp-switch&utm_content=next-step-cta\" target=\"_blank\" rel=\"noopener\" style=\"display:inline-block;background:#dc2626;color:#fff;font-weight:700;font-size:15px;padding:14px 32px;border-radius:30px;text-decoration:none;\">AI\u9b3c\u7ba1\u7406\u3092\u8a73\u3057\u304f\u898b\u308b \u2192<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-csharp-switch&#038;blog_slug=cc-csharp-switch\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-csharp-switch&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">\u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Q. C#\u306eswitch-case\u306f\u3069\u3093\u306a\u30c7\u30fc\u30bf\u578b\u3067\u4f7f\u3048\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. C#\u306eswitch-case\u306f\u3001\u6574\u6570\u578b\uff08int\u3001long\u7b49\uff09\u3001\u6587\u5b57\u5217\u578b\uff08string\uff09\u3001\u5217\u6319\u578b\uff08enum\uff09\u3001char\u578b\u3067\u4f7f\u3048\u307e\u3059\u3002C# 7.0\u4ee5\u964d\u3067\u306f\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u304c\u5f37\u5316\u3055\u308c\u3001\u578b\u30d1\u30bf\u30fc\u30f3\uff08is\u6f14\u7b97\u5b50\u76f8\u5f53\uff09\u3084\u6761\u4ef6\u30d1\u30bf\u30fc\u30f3\uff08when\u30ad\u30fc\u30ef\u30fc\u30c9\uff09\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002bool\u578b\u306fswitch-case\u3067\u306f\u306a\u304fif-else\u304c\u81ea\u7136\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. switch-case\u3068if-else\u306f\u3069\u3061\u3089\u304c\u901f\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u30b3\u30f3\u30d1\u30a4\u30e9\u304cswitch-case\u3092\u30b8\u30e3\u30f3\u30d7\u30c6\u30fc\u30d6\u30eb\u306b\u6700\u9069\u5316\u3067\u304d\u308b\u5834\u5408\u3001\u7406\u8ad6\u7684\u306b\u306fswitch-case\u304c\u6709\u5229\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u73fe\u4ee3\u306e\u30b3\u30f3\u30d1\u30a4\u30e9\u306f\u9ad8\u5ea6\u306a\u6700\u9069\u5316\u3092\u884c\u3046\u305f\u3081\u3001\u9078\u629e\u80a2\u304c\u5341\u6570\u500b\u4ee5\u4e0b\u3067\u306f\u5b9f\u7528\u4e0a\u306e\u5dee\u306f\u307b\u307c\u3042\u308a\u307e\u305b\u3093\u3002\u53ef\u8aad\u6027\u30fb\u4fdd\u5b88\u6027\u3092\u512a\u5148\u3057\u3066\u9078\u3076\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. C#\u3067\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\uff08fall-through\uff09\u306f\u4f7f\u3048\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. C#\u306f\u57fa\u672c\u7684\u306b\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\u3092\u7981\u6b62\u3057\u3066\u304a\u308a\u3001break\u306e\u306a\u3044case\u30d6\u30ed\u30c3\u30af\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001case\u3068case\u306e\u30e9\u30d9\u30eb\u9593\u306b\u30b3\u30fc\u30c9\u304c1\u884c\u3082\u306a\u3044\u5834\u5408\uff08\u8907\u6570case\u30e9\u30d9\u30eb\u306e\u9023\u7d9a\uff09\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300ccase 1: case 2: \u51e6\u7406; break;\u300d\u306e\u3088\u3046\u306b\u66f8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. switch\u5f0f\uff08switch expression\uff09\u3068switch\u6587\u306e\u4f7f\u3044\u5206\u3051\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. switch\u5f0f\uff08C# 8.0\u4ee5\u964d\uff09\u306f\u300c\u5024\u3092\u8fd4\u3059\u300d\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002\u5909\u6570\u3078\u306e\u4ee3\u5165\u3084\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u3068\u3057\u3066\u76f4\u63a5\u4f7f\u3048\u308b\u306e\u304c\u7279\u5fb4\u3067\u3059\u3002\u4e00\u65b9\u3001\u8907\u6570\u306e\u30e1\u30bd\u30c3\u30c9\u547c\u3073\u51fa\u3057\u3084\u8907\u96d1\u306a\u51e6\u7406\u3092\u5b9f\u884c\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u5f93\u6765\u306eswitch\u6587\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u300c\u5024\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u30fb\u5909\u63db\u306fswitch\u5f0f\u3001\u624b\u7d9a\u304d\u51e6\u7406\u306fswitch\u6587\u300d\u3068\u4f7f\u3044\u5206\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Claude Code\u3067\u751f\u6210\u3057\u305fswitch-case\u30b3\u30fc\u30c9\u306f\u5b9f\u969b\u306b\u4f7f\u3048\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u306f\u3044\u3001\u4f7f\u3048\u307e\u3059\u3002Claude Code\u306f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\uff08\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u69cb\u9020\u3084\u30b3\u30fc\u30c9\u30b9\u30bf\u30a4\u30eb\uff09\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u3092\u305d\u306e\u307e\u307e\u4f7f\u3046\u524d\u306b\u3001\u696d\u52d9\u30ed\u30b8\u30c3\u30af\u304c\u6b63\u3057\u304f\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u306e\u30ec\u30d3\u30e5\u30fc\u306f\u5fc5\u305a\u4eba\u9593\u304c\u884c\u3046\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002\u7279\u306b\u91d1\u878d\u7cfb\u30fb\u533b\u7642\u7cfb\u306e\u91cd\u8981\u696d\u52d9\u30ed\u30b8\u30c3\u30af\u306f\u8981\u6ce8\u610f\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. switch-case\u306ecase\u306b\u5909\u6570\u306f\u4f7f\u3048\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. C#\u306e\u5f93\u6765\u306eswitch-case\u6587\u3067\u306f\u3001case\u306b\u66f8\u3051\u308b\u306e\u306f\u5b9a\u6570\u5024\u306e\u307f\u3067\u3001\u5909\u6570\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002\u300ccase someVariable:\u300d\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002C# 9.0\u4ee5\u964d\u306eswitch\u5f0f\u3084when\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u3048\u3070\u3001\u5909\u6570\u3092\u4f7f\u3063\u305f\u6761\u4ef6\u3082\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u5909\u6570\u3068\u306e\u6bd4\u8f03\u304c\u5fc5\u8981\u306a\u5834\u5408\u306fif-else\u6587\u3092\u4f7f\u3046\u304b\u3001C# 9.0\u4ee5\u964d\u306e\u65b0\u69cb\u6587\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"C#\u306eswitch-case\u306f\u3069\u3093\u306a\u30c7\u30fc\u30bf\u578b\u3067\u4f7f\u3048\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"C#\u306eswitch-case\u306f\u3001\u6574\u6570\u578b\uff08int\u3001long\u7b49\uff09\u3001\u6587\u5b57\u5217\u578b\uff08string\uff09\u3001\u5217\u6319\u578b\uff08enum\uff09\u3001char\u578b\u3067\u4f7f\u3048\u307e\u3059\u3002C# 7.0\u4ee5\u964d\u3067\u306f\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u304c\u5f37\u5316\u3055\u308c\u3001\u578b\u30d1\u30bf\u30fc\u30f3\uff08is\u6f14\u7b97\u5b50\u76f8\u5f53\uff09\u3084\u6761\u4ef6\u30d1\u30bf\u30fc\u30f3\uff08when\u30ad\u30fc\u30ef\u30fc\u30c9\uff09\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002bool\u578b\u306fswitch-case\u3067\u306f\u306a\u304fif-else\u304c\u81ea\u7136\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"switch-case\u3068if-else\u306f\u3069\u3061\u3089\u304c\u901f\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u30b3\u30f3\u30d1\u30a4\u30e9\u304cswitch-case\u3092\u30b8\u30e3\u30f3\u30d7\u30c6\u30fc\u30d6\u30eb\u306b\u6700\u9069\u5316\u3067\u304d\u308b\u5834\u5408\u3001\u7406\u8ad6\u7684\u306b\u306fswitch-case\u304c\u6709\u5229\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u73fe\u4ee3\u306e\u30b3\u30f3\u30d1\u30a4\u30e9\u306f\u9ad8\u5ea6\u306a\u6700\u9069\u5316\u3092\u884c\u3046\u305f\u3081\u3001\u9078\u629e\u80a2\u304c\u5341\u6570\u500b\u4ee5\u4e0b\u3067\u306f\u5b9f\u7528\u4e0a\u306e\u5dee\u306f\u307b\u307c\u3042\u308a\u307e\u305b\u3093\u3002\u53ef\u8aad\u6027\u30fb\u4fdd\u5b88\u6027\u3092\u512a\u5148\u3057\u3066\u9078\u3076\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"C#\u3067\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\uff08fall-through\uff09\u306f\u4f7f\u3048\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"C#\u306f\u57fa\u672c\u7684\u306b\u30d5\u30a9\u30fc\u30eb\u30b9\u30eb\u30fc\u3092\u7981\u6b62\u3057\u3066\u304a\u308a\u3001break\u306e\u306a\u3044case\u30d6\u30ed\u30c3\u30af\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001case\u3068case\u306e\u30e9\u30d9\u30eb\u9593\u306b\u30b3\u30fc\u30c9\u304c1\u884c\u3082\u306a\u3044\u5834\u5408\uff08\u8907\u6570case\u30e9\u30d9\u30eb\u306e\u9023\u7d9a\uff09\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300ccase 1: case 2: \u51e6\u7406; break;\u300d\u306e\u3088\u3046\u306b\u66f8\u3051\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"switch\u5f0f\uff08switch expression\uff09\u3068switch\u6587\u306e\u4f7f\u3044\u5206\u3051\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"switch\u5f0f\uff08C# 8.0\u4ee5\u964d\uff09\u306f\u300c\u5024\u3092\u8fd4\u3059\u300d\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002\u5909\u6570\u3078\u306e\u4ee3\u5165\u3084\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u3068\u3057\u3066\u76f4\u63a5\u4f7f\u3048\u308b\u306e\u304c\u7279\u5fb4\u3067\u3059\u3002\u4e00\u65b9\u3001\u8907\u6570\u306e\u30e1\u30bd\u30c3\u30c9\u547c\u3073\u51fa\u3057\u3084\u8907\u96d1\u306a\u51e6\u7406\u3092\u5b9f\u884c\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u5f93\u6765\u306eswitch\u6587\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u300c\u5024\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u30fb\u5909\u63db\u306fswitch\u5f0f\u3001\u624b\u7d9a\u304d\u51e6\u7406\u306fswitch\u6587\u300d\u3068\u4f7f\u3044\u5206\u3051\u307e\u3057\u3087\u3046\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Claude Code\u3067\u751f\u6210\u3057\u305fswitch-case\u30b3\u30fc\u30c9\u306f\u5b9f\u969b\u306b\u4f7f\u3048\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u306f\u3044\u3001\u4f7f\u3048\u307e\u3059\u3002Claude Code\u306f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\uff08\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u69cb\u9020\u3084\u30b3\u30fc\u30c9\u30b9\u30bf\u30a4\u30eb\uff09\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u3092\u305d\u306e\u307e\u307e\u4f7f\u3046\u524d\u306b\u3001\u696d\u52d9\u30ed\u30b8\u30c3\u30af\u304c\u6b63\u3057\u304f\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u306e\u30ec\u30d3\u30e5\u30fc\u306f\u5fc5\u305a\u4eba\u9593\u304c\u884c\u3046\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002\u7279\u306b\u91d1\u878d\u7cfb\u30fb\u533b\u7642\u7cfb\u306e\u91cd\u8981\u696d\u52d9\u30ed\u30b8\u30c3\u30af\u306f\u8981\u6ce8\u610f\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"switch-case\u306ecase\u306b\u5909\u6570\u306f\u4f7f\u3048\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"C#\u306e\u5f93\u6765\u306eswitch-case\u6587\u3067\u306f\u3001case\u306b\u66f8\u3051\u308b\u306e\u306f\u5b9a\u6570\u5024\u306e\u307f\u3067\u3001\u5909\u6570\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002\u300ccase someVariable:\u300d\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002C# 9.0\u4ee5\u964d\u306eswitch\u5f0f\u3084when\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u3048\u3070\u3001\u5909\u6570\u3092\u4f7f\u3063\u305f\u6761\u4ef6\u3082\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u5909\u6570\u3068\u306e\u6bd4\u8f03\u304c\u5fc5\u8981\u306a\u5834\u5408\u306fif-else\u6587\u3092\u4f7f\u3046\u304b\u3001C# 9.0\u4ee5\u964d\u306e\u65b0\u69cb\u6587\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\n      }\n    }\n  ]\n}\n<\/script>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9 01switch-case\u6587\u3068\u306f\u4f55\u304b\u2015\u2015\u6761\u4ef6\u5206\u5c90\u306e\u57fa\u790e\u3068\u696d\u52d9\u30d5\u30ed\u30fc\u3078\u306e\u5bfe\u5fdc 02\u57fa\u672c\u69cb\u6587\u3068\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306aswitch-case\u306e\u66f8\u304d\u65b9 03\u6570\u5024\u3067\u306e\u6761\u4ef6\u5206\u5c90\u2015\u2015\u30b9\u30b3\u30a2\u30fb\u7b49\u7d1a\u30fb\u30e9\u30f3\u30af\u5224\u5b9a\u306e\u5b9f\u4f8b 04\u6587\u5b57\u5217\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sitemap_hide":"","_veu_custom_css":"","vkexunit_cta_each_option":"","footnotes":"","rank_math_description":"C#\u306eswitch-case\u6587\u3092\u5b8c\u5168\u89e3\u8aac\u3002\u6570\u5024\u30fb\u6587\u5b57\u5217\u3067\u306e\u6761\u4ef6\u5206\u5c90\u306e\u66f8\u304d\u65b9\u304b\u3089\u3001\u8907\u6570\u6761\u4ef6\u306e\u307e\u3068\u3081\u65b9\u3001C# 8.0\u4ee5\u964d\u306eswitch\u5f0f\u3001if-else\u3068\u306e\u4f7f\u3044\u5206\u3051\u3001\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u5b9f\u8df5\u6d3b\u7528\u307e\u3067\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u5411\u3051\u306b\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002","rank_math_focus_keyword":"C# switch-case","rank_math_title":"","pending_rewrite_html":"","pending_rewrite_id":"","pending_rewrite_kw":"","pending_rewrite_at":"","pending_rewrite_source":"","pending_rewrite_brief":"","pending_rewrite_evidence":"","approved_rewrite_html":"","approved_rewrite_id":"","approved_rewrite_kw":"","approved_rewrite_at":"","approved_rewrite_by":"","approved_rewrite_brief":"","approved_rewrite_evidence":"","rewrite_tracker_baseline":"","rewrite_tracker_7day":"","rewrite_tracker_14day":"","rewrite_tracker_30day":"","rewrite_tracker_notified":""},"categories":[3],"tags":[],"class_list":["post-18316","post","type-post","status-publish","format-standard","hentry","category-ai-automation"],"_links":{"self":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/comments?post=18316"}],"version-history":[{"count":1,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18316\/revisions"}],"predecessor-version":[{"id":18317,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18316\/revisions\/18317"}],"wp:attachment":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media?parent=18316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/categories?post=18316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/tags?post=18316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}