What I'd like to avoid:
ManagementClass m = new ManagementClass("Win32_LogicalDisk");
ManagementObjectCollection managementObjects = m.GetInstances();
List<ManagementObject> managementList = new List<ManagementObject>();
foreach(ManagementObject m in managementObjects){
managementList.Add(m);
}
Isn't there a way to get that collection into a List that looks something like:
List<ManagementObject> managementList = new List<ManagementObjec>(collection_array);
Thanks much!