forum

home / developersection / forums / how to lookup hard drive model with c#?

How to lookup Hard Drive model with C#?

Takeshi Okada 3162 16-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 "";
    }

c# c# 
Updated on 16-Oct-2013
Can you answer this question?

Answer

1 Answers

Liked By