{ ManagementClass diskClass = new ManagementClass("Win32_LogicalDisk"); diskClass.Get(); Console.WriteLine("Logical Disk class has " + diskClass.Properties.Count + " properties"); return 0; } } [vb] Imports System.Managemen Class Sample_ManagementClass Overloads Public Shared Function Main(args() As String) As Integer Dim diskClass As New ManagementClass("Win32_LogicalDisk") diskClass.Get() Console.WriteLine(("Logical Disk class has " & diskClass.Properties.Count.ToString() & " properties")) Return 0 End Function End Class
|
正在阅读:.Net基础:使用WMI获得硬盘的信息.Net基础:使用WMI获得硬盘的信息
2004-02-14 09:34
出处:CSDN
责任编辑:linjixiong
键盘也能翻页,试试“← →”键