To get the total disk space of the system using C#, you can use the DriveInfo
class. Here's an example:
main.cs316 chars12 lines
The DriveInfo.GetDrives()
method returns an array of all drives in the system. The IsReady
property checks if the drive is available. The TotalSize
property returns the total size of the drive in bytes.
gistlibby LogSnag