{"id":2322,"date":"2010-04-18T23:17:31","date_gmt":"2010-04-18T14:17:31","guid":{"rendered":"http:\/\/blog.tksk.net\/?p=2322"},"modified":"2010-04-19T01:06:44","modified_gmt":"2010-04-18T16:06:44","slug":"c4","status":"publish","type":"post","link":"https:\/\/blog.tksk.net\/?p=2322","title":{"rendered":"C#4"},"content":{"rendered":"<p>C# 4 \u3067\u5909\u308f\u3063\u305f\u4e8b\u3002<\/p>\n<p>\u5370\u8c61\u6df1\u3044\u306e\u306f dynamic \u30ad\u30fc\u30ef\u30fc\u30c9\u3002\u9759\u7684\u578b\u4ed8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u308b C# \u3067\u3001\u52d5\u7684\u578b\u4ed8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3063\u307d\u3044\u8a18\u8ff0\u3092\u53ef\u80fd\u306b\u3059\u308b\u3002<\/p>\n<p>\u3046\u30fc\u3093\u3001\u306a\u3093\u304b\u9055\u3046\u3093\u3060\u3088\u306a\u3002\u4f55\u304b\u304c\u3002\u52d5\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u304c\u3061\u3087\u3063\u3068\u524d\u304b\u3089\u4eba\u6c17\u8005\u306b\u306a\u3063\u3066\u3066\u3001 CLI \u304c\u305d\u308c\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u306a\u308b\u3002\u3053\u306e\u6d41\u308c\u306f\u4ed5\u65b9\u306a\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u305d\u3046\u306a\u3093\u3060\u3051\u3069\u3001\u554f\u984c\u306f\u305d\u3053\u304b\u3089\u3067\u3001\u300cCLI \u3067\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u308b\u3057\u3001 C# \u3067\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3061\u3083\u3048\u3070\u3088\u304f\u306d ?\u300d\u307f\u305f\u3044\u306a\u30ce\u30ea\u3092\u611f\u3058\u3066\u3057\u307e\u3063\u3066\u3001\u3069\u3046\u306b\u3082\u3044\u3084\u3060\u3002\u666e\u901a\u306b\u6eb6\u3051\u8fbc\u307f\u3059\u304e\u3066\u3069\u3046\u306b\u3082\u3002<\/p>\n<p>\u305f\u3076\u3093\u3001GetType() \u3068\u304b InvokeMember() \u3068\u304b\u306b\u5909\u63db\u3055\u308c\u308b\u3060\u3051\u3067\u3001\u5b9f\u969b\u306e\u5185\u90e8\u7684\u306b\u306f\u5927\u3057\u305f\u5909\u5316\u3067\u306f\u306a\u3044\u306e\u304b\u3082\u3057\u3089\u3093\u3002\u3060\u3051\u3069\u3001C# 3 \u307e\u3067\u306e\u3001\u3042\u306e\u307e\u3069\u308d\u3063\u3053\u3057\u3044\u8a18\u8ff0\u306b\u3088\u3063\u3066\u3001\u300c\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u5931\u6557\u3057\u3061\u3083\u3046\u304b\u3082\u306d\u3001\u30c6\u30d8\u30c3\u300d\u3063\u3066\u306e\u3092\u3061\u3083\u3093\u3068\u610f\u8b58\u3067\u304d\u305f\u3068\u3044\u3046\u9762\u304c\u3042\u308b\u3002\u305d\u308c\u306b\u3088\u3063\u3066\u3001\u7570\u8cea\u306a\u5bfe\u8c61(\u52d5\u7684\u306a\u578b)\u306b\u5bfe\u3057\u3066\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u610f\u8b58\u3082\u751f\u307e\u308c\u305f\u308f\u3051\u3060\u3002<\/p>\n<p>\u3067\u3082\u3069\u3046\u8003\u3048\u3066\u3082\u30e9\u30af\u3061\u3093\u3060\u304b\u3089\u3001 C# 4 \u3067\u306f\u305d\u308c\u3092\u5168\u90e8\u7121\u304f\u3057\u3066\u3057\u307e\u3048\u3068\u3002\u305d\u3046\u306a\u3093\u3060\u3051\u3069\u3001\u4eca\u307e\u3067\u306e C# \u306e\u5909\u9077\u3092\u632f\u308a\u8fd4\u308b\u3068\u3001<\/p>\n<p>C#2 \u306e\u30b8\u30a7\u30cd\u30ea\u30c3\u30af\u306f\u578b\u5b89\u5168\u306a\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u7fa4\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u307e\u3057\u305f\u3002\u3042\u3042\u3001\u307f\u3093\u306a\u30cf\u30c3\u30d4\u30fc\u3002<\/p>\n<p>C#3 \u306e Linq \u3068\u305d\u308c\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306e var \u3084\u3089\u4f55\u3084\u3089\u306f\u3001\u30ea\u30b9\u30c8\u306e\u51e6\u7406\u3092\u95a2\u6570\u578b\u8a00\u8a9e\u3063\u307d\u304f\u30a8\u30ec\u30ac\u30f3\u30c8\u306b\u8a18\u8ff0\u3059\u308b\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u307e\u3057\u305f\u3002\u3042\u3042\u3001\u307f\u3093\u306a\u30cf\u30c3\u30d4\u30fc\u3002<\/p>\n<p>C#4 \u306e dynamic \u30ad\u30fc\u30ef\u30fc\u30c9\u306f\u3001\u3001\u3001\u3046\u30fc\u3093\u3001\u4fbf\u5229\u3060\u3051\u3069\u3001\u3053\u308c\u3063\u3066 C# \u3092\u4f7f\u3046\u69d8\u3005\u306a\u5c40\u9762\u306b\u5171\u901a\u3059\u308b\u3088\u3046\u306a\u3053\u3068\u304b? \u4ffa\u306b\u306f\u305d\u3046\u601d\u3048\u306a\u3044\u3002\u305d\u308c\u3060\u3063\u305f\u3089\u3001IronPython \u3067 CLI \u53e9\u3044\u3066\u308b\u307b\u3046\u304c\u3044\u3044\u3093\u3058\u3083\u306d? \u3063\u3066\u601d\u3046\u3002 C# \u3092\u62e1\u5f35\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u3093\u304b\u306a\u3001\u3063\u3066\u3002<\/p>\n<p>\u305d\u3046\u3044\u3048\u3070\u3001\u4f55\u304b\u306e\u30c9\u30e9\u30d5\u30c8\u3060\u3063\u305f\u304b\u3001blog \u3060\u3063\u305f\u304b\u3067\u898b\u305f dynamic { foo.bar(); } \u3053\u308c\u306a\u3089\u306a\u3093\u3068\u306a\u304f\u3088\u304b\u3063\u305f\u304b\u3082\u3002 unsafe { } \u307f\u305f\u3044\u306b\u3002\u4f55\u304b\u7279\u5225\u306a\u3053\u3068\u3092\u3084\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u306e\u304c\u3059\u3050\u306b\u308f\u304b\u308b\u304b\u3089\u3002\u3063\u3066\u3001\u62e1\u5f35\u3057\u305f\u3053\u3068\u81ea\u4f53\u304c\u307e\u305a\u304b\u3063\u305f\u306e\u304b\u3001\u305d\u306e\u65b9\u6cd5\u304c\u307e\u305a\u304b\u3063\u305f\u306e\u304b\u3001\u3044\u307e\u3044\u3061\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u3044\u308b\u90e8\u5206\u304c\u308f\u304b\u3089\u3093\u5185\u5bb9\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u304c\u3002\u3002\u3002<\/p>\n<p>\u3042\u3001\u540d\u524d\u4ed8\u304d\u30d1\u30e9\u30e1\u30fc\u30bf\u3001\u3053\u308c\u306f\u3044\u3044\u3068\u601d\u3046\u3002\u3046\u3093\u3001\u3053\u3046\u3044\u3046\u306e\u3002\u3046\u3093\u3001\u3044\u3044\u3068\u601d\u3046\u306a\u3001\u3044\u3044\u3068\u601d\u3046\u3088! \u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3059\u308b\u3068\u304d\u306b\u3046\u307e\u304f\u3084\u3089\u306a\u3044\u3068\u5927\u5909\u306a\u3053\u3068\u306b\u306a\u308a\u305d\u3046\u3060\u3051\u3069\uff57<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C# 4 \u3067\u5909\u308f\u3063\u305f\u4e8b\u3002 \u5370\u8c61\u6df1\u3044\u306e\u306f dynamic \u30ad\u30fc\u30ef\u30fc\u30c9\u3002\u9759\u7684\u578b\u4ed8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u308b C# \u3067\u3001\u52d5\u7684\u578b\u4ed8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3063\u307d\u3044\u8a18\u8ff0\u3092\u53ef\u80fd\u306b\u3059\u308b\u3002 \u3046\u30fc\u3093\u3001\u306a\u3093\u304b\u9055\u3046\u3093\u3060\u3088\u306a\u3002\u4f55\u304b\u304c\u3002\u52d5\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.tksk.net\/index.php?rest_route=\/wp\/v2\/posts\/2322"}],"collection":[{"href":"https:\/\/blog.tksk.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tksk.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tksk.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tksk.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2322"}],"version-history":[{"count":7,"href":"https:\/\/blog.tksk.net\/index.php?rest_route=\/wp\/v2\/posts\/2322\/revisions"}],"predecessor-version":[{"id":2329,"href":"https:\/\/blog.tksk.net\/index.php?rest_route=\/wp\/v2\/posts\/2322\/revisions\/2329"}],"wp:attachment":[{"href":"https:\/\/blog.tksk.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tksk.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tksk.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}