Users Pricing

forum

Home Forums How to lookup Hard Drive model with C#? – MindStick

How to lookup Hard Drive model with C#?

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

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md