易丰科技

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3208|回复: 0
打印 上一主题 下一主题

.NET 4.0 New Feature - 关於 64 位元判断

[复制链接]

111

主题

117

帖子

3588

积分

论坛元老

Rank: 8Rank: 8

积分
3588
跳转到指定楼层
楼主
发表于 2011-10-7 14:56:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
.NET 4.0在Environment類別新增Is64BitOperatingSystem與Is64BitProcess屬性,其功用分別為判斷當前作業系統是否為64位元版本,與判斷當前處理序是否為64位元。
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;

  5. namespace ConsoleApplication4
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             Console.WriteLine("64位元作業系統: {0}",Environment.Is64BitOperatingSystem);
  12.             Console.WriteLine("64位元處理序: {0}", Environment.Is64BitProcess);
  13.         }
  14.     }
  15. }
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|易丰科技

GMT+8, 2024-10-12 17:23 , Processed in 0.040665 second(s), 20 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表