forum

Home / DeveloperSection / Forums / How to lookup Hard Drive model with C#?

How to lookup Hard Drive model with C#?

Takeshi Okada277116-Oct-2013

I'm trying to get device information about particular local hard drives. I've been able to create a few value returning methods using the DriveInfo class like this:

public string getDriveFormat(string driveName) 
    {
        foreach (DriveInfo driveInfo in DriveInfo.GetDrives())
        {
            if (driveInfo.IsReady && driveInfo.Name == driveName)
            {
                return driveInfo.DriveFormat;
            }
        }
        return "";
    }

Updated on 16-Oct-2013

Can you answer this question?


Answer

1 Answers

Liked By