How i found only my CD/DVD drive not any other HDD,flash drive or virtual drive.
& the status is there has any cd present or not.
Thank you in advance. :)
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tanmay SarkarPosted Aug 3, 2010, 6:38 AM
I wrote this code before posting my problem.
this code can't say the drive is virtual or not. :)
So I write this post to not showing any virtual drive.
thanks for your response & time. :)
And for your question, I am just crop a picture from my collection, I am not edit it :)
Thanks for your complement. :)
Mamta MPosted Aug 3, 2010, 6:19 AM
Mamta MPosted Aug 3, 2010, 6:14 AM
System.IO.DriveInfo[] drives = System.IO.DriveInfo.GetDrives();
foreach (System.IO.DriveInfo drive in drives)
{
if (drive.DriveType == System.IO.DriveType.CDRom)
Console.WriteLine(drive.Name);
}