当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: using System;using System.Runtime.InteropServices;usingSystem.Management;namespace Hardware{/// <summary>/// Hardware_Mac 的摘要说明。
 

 

 ·building a t-sql loop    »显示摘要«
    摘要:november 5, 2003t-sql programming part 2 - building a t-sql loopby gregory a. larsen this is the second article in my t-sql programming series. this article will discuss building a program loop usi......
    摘要:/* 利用"委托"实现对象实例按"多字段嵌套"排序 (不知道大家看懂题目了? 功能还是挺实用的!) 本文实现 person 类的实例们按 年龄、身高、体重等字段嵌套排序! 就像 sql 查询的 order by 字段1,字段2,...,字段n 子句的效果一样! */ using system; class class1 //客......


C#如何取硬件标志
using system;

using system.runtime.interopservices; 【程序编程相关:UML学习笔记

【推荐阅读:Reference and Except

using  system.management; 【扩展信息:梦网模式下的sp生存

namespace hardware

{

/// <summary>

/// hardware_mac 的摘要说明.

/// </summary>

public class hardwareinfo

{

  //取机器名

  public string gethostname()

  {

   return system.net.dns.gethostname();

  }

  //取cpu编号

  public string getcpuid()

  {

   try

   {

    managementclass mc = new managementclass("win32_processor");

    managementobjectcollection moc = mc.getinstances();

      

    string strcpuid = null ;

    foreach( managementobject mo in moc )

    {

     strcpuid = mo.properties["processorid"].value.tostring();

     break;

    }

    return strcpuid;

   }

   catch

   {

    return "";

   }

  }//end method

  //取第一块硬盘编号

  public string getharddiskid()

  {

   try

   {


...   下一页
    摘要:office 12 beta 1 – may 2005 windows longhorn beta 1 – june 2005 windows longhorn server beta 1 – june 2005 office 2006 beta 2 – november 2005 windows 2006 beta 2 – ja......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE