Click here to Skip to main content
16,009,068 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to obtain drive letters without checking the diskette? Pin
Tom Wright8-Mar-06 7:04
Tom Wright8-Mar-06 7:04 
GeneralRe: How to obtain drive letters without checking the diskette? Pin
Dan Neely8-Mar-06 7:19
Dan Neely8-Mar-06 7:19 
GeneralRe: How to obtain drive letters without checking the diskette? Pin
Tom Wright8-Mar-06 7:25
Tom Wright8-Mar-06 7:25 
GeneralRe: How to obtain drive letters without checking the diskette? Pin
Dan Neely8-Mar-06 7:53
Dan Neely8-Mar-06 7:53 
AnswerRe: How to obtain drive letters without checking the diskette? Pin
Tom Wright8-Mar-06 7:20
Tom Wright8-Mar-06 7:20 
AnswerRe: How to obtain drive letters without checking the diskette? Pin
Guffa8-Mar-06 9:02
Guffa8-Mar-06 9:02 
GeneralRe: How to obtain drive letters without checking the diskette? Pin
Libor Tinka8-Mar-06 10:49
Libor Tinka8-Mar-06 10:49 
AnswerRe: How to obtain drive letters without checking the diskette? Pin
Steve Hansen9-Mar-06 3:32
Steve Hansen9-Mar-06 3:32 
You can always use this:

	static public void Main(string[] args)<br />
	{<br />
        // Drives are only possible from A: till Z:<br />
<br />
        for (char driveLetter = 'A'; driveLetter <= 'Z'; driveLetter++)<br />
        {<br />
            DriveInfo drive = new DriveInfo(driveLetter.ToString());<br />
            switch (drive.DriveType)<br />
            {<br />
                case DriveType.NoRootDirectory:<br />
                    // No drive<br />
                    break;<br />
                default:<br />
                    Console.WriteLine("Found drive at " + drive + " of type " + drive.DriveType);<br />
                    break;<br />
            }<br />
        }<br />
	}<br />


It will only make the annoying noise when you access the properties of the drive instance.
bool ready = drive.IsReady;
Like that.
GeneralRe: How to obtain drive letters without checking the diskette? Pin
Libor Tinka9-Mar-06 6:20
Libor Tinka9-Mar-06 6:20 
Questionhow to convert a physical address to a virtual address? Pin
bharadwaj_r8-Mar-06 6:36
bharadwaj_r8-Mar-06 6:36 
AnswerRe: how to convert a physical address to a virtual address? Pin
Judah Gabriel Himango8-Mar-06 7:14
sponsorJudah Gabriel Himango8-Mar-06 7:14 
GeneralRe: how to convert a physical address to a virtual address? Pin
bharadwaj_r8-Mar-06 19:22
bharadwaj_r8-Mar-06 19:22 
GeneralRe: how to convert a physical address to a virtual address? Pin
Judah Gabriel Himango9-Mar-06 5:00
sponsorJudah Gabriel Himango9-Mar-06 5:00 
QuestionWhat are these WndProc WMs? Pin
redfish348-Mar-06 6:25
redfish348-Mar-06 6:25 
AnswerRe: What are these WndProc WMs? Pin
Dan Neely8-Mar-06 7:15
Dan Neely8-Mar-06 7:15 
GeneralRe: What are these WndProc WMs? Pin
redfish348-Mar-06 22:03
redfish348-Mar-06 22:03 
AnswerRe: What are these WndProc WMs? Pin
Le centriste8-Mar-06 15:14
Le centriste8-Mar-06 15:14 
QuestionAutoscroll to a rectangle drawn in paint event Pin
Gulfraz Khan8-Mar-06 5:19
Gulfraz Khan8-Mar-06 5:19 
QuestionFile Icon Pin
Mr Marchepane8-Mar-06 4:52
Mr Marchepane8-Mar-06 4:52 
AnswerRe: File Icon Pin
redfish348-Mar-06 6:31
redfish348-Mar-06 6:31 
QuestionWebservices (RPC+SOAP) Pin
mpuerto8-Mar-06 4:20
mpuerto8-Mar-06 4:20 
QuestionTableLayoutPanel question Pin
Drew McGhie8-Mar-06 4:10
Drew McGhie8-Mar-06 4:10 
QuestionGraphics in C# Pin
Jeea20068-Mar-06 3:42
Jeea20068-Mar-06 3:42 
AnswerRe: Graphics in C# Pin
Judah Gabriel Himango8-Mar-06 3:55
sponsorJudah Gabriel Himango8-Mar-06 3:55 
GeneralRe: Graphics in C# Pin
Jeea200618-Mar-06 22:49
Jeea200618-Mar-06 22:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.