请教下ManagementObject这个类的相关属性

pztx1992 2008-11-11 11:07:19
该对象好像还有根据名称索引相对应的数据

如 foreach (ManagementObject disk in searcher.Get())
{
//获取驱动器盘符
disk.
this.treeBigList.Nodes.Add(disk["Name"].ToString(), disk["Size"].ToString());
MessageBox.Show("Description: " + disk["Description"]);
MessageBox.Show("File system: " + disk["FileSystem"]);
MessageBox.Show("Free disk space: " + disk["FreeSpace"]);
MessageBox.Show("Size: " + disk["Size"]);
}

//除了size,name,description,filesystem,freespace还有没有其他的??

最好能够给各详细网址进行参考
...全文
1004 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangkuang5 2008-11-13
  • 打赏
  • 举报
回复
http://msdn.microsoft.com/en-us/library/aa394572(VS.85).aspx
http://en.wikipedia.org/wiki/Windows_Management_Instrumentation
pvgyetg 2008-11-13
  • 打赏
  • 举报
回复
友情UP
止戈而立 2008-11-12
  • 打赏
  • 举报
回复
以前查过这方面的资料,保存下来的。。
不过刚刚发现资料里保存着地址,把它发出来,楼主自己去看看:
http://msdn.microsoft.com/en-us/library/aa394173(VS.85).aspx
止戈而立 2008-11-12
  • 打赏
  • 举报
回复
还多得很:
class Win32_LogicalDisk : CIM_LogicalDisk 
{
uint16 Access;
uint16 Availability;
uint64 BlockSize;
string Caption;
boolean Compressed;
uint32 ConfigManagerErrorCode;
boolean ConfigManagerUserConfig;
string CreationClassName;
string Description;
string DeviceID;
uint32 DriveType;
boolean ErrorCleared;
string ErrorDescription;
string ErrorMethodology;
string FileSystem;
uint64 FreeSpace;
datetime InstallDate;
uint32 LastErrorCode;
uint32 MaximumComponentLength;
uint32 MediaType;
string Name;
uint64 NumberOfBlocks;
string PNPDeviceID;
uint16 PowerManagementCapabilities[];
boolean PowerManagementSupported;
string ProviderName;
string Purpose;
boolean QuotasDisabled;
boolean QuotasIncomplete;
boolean QuotasRebuilding;
uint64 Size;
string Status;
uint16 StatusInfo;
boolean SupportsDiskQuotas;
boolean SupportsFileBasedCompression;
string SystemCreationClassName;
string SystemName;
boolean VolumeDirty;
string VolumeName;
string VolumeSerialNumber;
};
nealwike 2008-11-11
  • 打赏
  • 举报
回复
路过,帮up

110,539

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧