5 Replies - 320 Views - Last Post: 05 May 2020 - 05:03 AM Rate Topic: -----

#1 sh4sh4   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 21-September 11

c# form application help

Posted 03 May 2020 - 03:36 PM

how can i make if c: drive existing do x if d drive existing do this y
Is This A Good Question/Topic? 0
  • +

Replies To: c# form application help

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15780
  • View blog
  • Posts: 63,237
  • Joined: 12-June 08

Re: c# form application help

Posted 03 May 2020 - 03:38 PM

Super duper vague on the x and y, so I assume you just don't know how to poll drives?
Was This Post Helpful? 0
  • +
  • -

#3 RamonRobben   User is offline

  • D.I.C Addict
  • member icon

Reputation: 91
  • View blog
  • Posts: 602
  • Joined: 19-May 14

Re: c# form application help

Posted 03 May 2020 - 04:02 PM

View Postmodi123_1, on 03 May 2020 - 03:38 PM, said:

Super duper vague on the x and y, so I assume you just don't know how to poll drives?


I assume he wants to know what drives exist and if certain drives exist he wants to execute more code.


You can use DriveInfo.GetDrives() to get the drives on the computer. You can loop over it and execute code for each drive.
Or you can check if certain drives exist and execute specific code for them. I think this should guide you in the right direction.

Posted Image
Was This Post Helpful? 0
  • +
  • -

#4 sh4sh4   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 21-September 11

Re: c# form application help

Posted 03 May 2020 - 04:41 PM

thank you #3RamonRobben
Was This Post Helpful? 0
  • +
  • -

#5 sh4sh4   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 21-September 11

Re: c# form application help

Posted 04 May 2020 - 06:07 PM

i get all drivers in combobox.
how will i use one by one?
Was This Post Helpful? 0
  • +
  • -

#6 RamonRobben   User is offline

  • D.I.C Addict
  • member icon

Reputation: 91
  • View blog
  • Posts: 602
  • Joined: 19-May 14

Re: c# form application help

Posted 05 May 2020 - 05:03 AM

View Postsh4sh4, on 04 May 2020 - 06:07 PM, said:

i get all drivers in combobox.
how will i use one by one?


Loop through them using a for loop or a for each loop.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1