hi all
i am using this code to get free space of hard disk drives. i want to get the logical drives ie.(C: 10GB, D: 5.8GB, E: 6.2GB) with free space on individual logical drives, inside a "label.text" or some other suitable container.
please somebody re-arrange this code.
Code:page load() { ManagementClass partionsClass = new ManagementClass("Win32_LogicalDisk"); ManagementObjectCollection partions = partionsClass.GetInstances(); string hdd = string.Empty; foreach (ManagementObject partion in partions) { hdd = Convert.ToString(partion["freespace"]); } }




Reply With Quote