using System; using System.Configuration; using System.Runtime.InteropServices; }
MemoryInfo.cs
using System; using System.Configuration; using System.Runtime.InteropServices; }
SystemTimeInfo.cs
using System; using System.Configuration; using System.Runtime.InteropServices; }
另外还定义了一个调用类SystemInfo.cs,代码如下:
using System; using System.Configuration; using System.Runtime.InteropServices; using System.Management; using System.Text; }
以下是调用实例,为了简单,我在一个aspx页面中输出,不过这个程序可以在WinForm中调用:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Collections.Specialized; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Runtime.InteropServices; publicpartialclass Index : System.Web.UI.Page