본문 바로가기
씨샵

운영체제 알아내기

by 케야르 2010. 12. 21.

int nMajor = System.Environment.OSVersion.Version.Major;

            int nMinor = System.le="COLOR: #2b91af">Environment.OSVersion.Version.Minor;

            String strPlatform = String.Format("{0}.{1}", nMajor, nMinor);

            switch (strPlatform)

            {

                case "4.1":

                    return "Windows 98";

                case "4.9":

                    return "Windows Me";

                case "5.0":

                    return "Windows 2000";

                case "5.1":

                    return "Windows XP";

                case "5.2":

                    return "Windows 2003";

                case "6.0":

                    return "Windows Vista";

            }