{"id":223,"date":"2012-07-28T11:54:40","date_gmt":"2012-07-28T02:54:40","guid":{"rendered":"http:\/\/blog.belliny.net\/?p=223"},"modified":"2012-07-28T11:54:40","modified_gmt":"2012-07-28T02:54:40","slug":"mono%ec%97%90%ec%84%9c-platform-os-%ea%b5%ac%eb%b6%84%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/www.belliny.net\/?p=223","title":{"rendered":"Mono\uc5d0\uc11c Platform OS \uad6c\ubd84\ud558\uae30"},"content":{"rendered":"<p>http:\/\/stackoverflow.com\/questions\/9129491\/c-sharp-compiled-in-mono-detect-os<\/p>\n<pre><code>string msg1 = \"This is a Windows operating system.\";\nstring msg2 = \"This is a Unix operating system.\";\nstring msg3 = \"ERROR: This platform identifier is invalid.\";\n\nOperatingSystem os = Environment.OSVersion;\nPlatformID \u00a0 \u00a0 pid = os.Platform;\nswitch (pid) \n\u00a0 \u00a0 {\n\u00a0 \u00a0 case PlatformID.Win32NT:\n\u00a0 \u00a0 case PlatformID.Win32S:\n\u00a0 \u00a0 case PlatformID.Win32Windows:\n\u00a0 \u00a0 case PlatformID.WinCE:\n\u00a0 \u00a0 \u00a0 \u00a0 Console.WriteLine(msg1);\n\u00a0 \u00a0 \u00a0 \u00a0 break;\n\u00a0 \u00a0 case PlatformID.Unix:\n\u00a0 \u00a0 \u00a0 \u00a0 Console.WriteLine(msg2);\n\u00a0 \u00a0 \u00a0 \u00a0 break;\n\u00a0 \u00a0 default:\n\u00a0 \u00a0 \u00a0 \u00a0 Console.WriteLine(msg3);\n\u00a0 \u00a0 \u00a0 \u00a0 break;\n\u00a0 \u00a0 }\n}<\/code><\/pre>\n<p>\uc790~ \uadf8\ub7fc Compile \ud0c0\uc784\uc5d0 \uc774\uac78 \uc54c \uc218 \uc788\ub294 \ubc29\ubc95\uc740?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/stackoverflow.com\/questions\/9129491\/c-sharp-compiled-in-mono-detect-os string msg1 = &#8220;This is a Windows operating system.&#8221;; string msg2 = &#8220;This is a Unix operating system.&#8221;; string msg3 = &#8220;ERROR: This platform identifier is invalid.&#8221;; OperatingSystem os = Environment.OSVersion; PlatformID \u00a0 \u00a0 pid = os.Platform; switch (pid) \u00a0 \u00a0 { \u00a0 \u00a0 case PlatformID.Win32NT: \u00a0 \u00a0 case PlatformID.Win32S: \u00a0 \u00a0 case PlatformID.Win32Windows: &hellip; <a href=\"https:\/\/www.belliny.net\/?p=223\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mono\uc5d0\uc11c Platform OS \uad6c\ubd84\ud558\uae30&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-223","post","type-post","status-publish","format-standard","hentry","category-talk"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.belliny.net\/index.php?rest_route=\/wp\/v2\/posts\/223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.belliny.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.belliny.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.belliny.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.belliny.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=223"}],"version-history":[{"count":0,"href":"https:\/\/www.belliny.net\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.belliny.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.belliny.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.belliny.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}