How can I detect if there is a floppy in a drive?

前端 未结 7 1783
孤独总比滥情好
孤独总比滥情好 2021-01-18 23:03

I tried to use DriveInfo.IsReady, but it returns false if an unformatted floppy is in the drive.

7条回答
  •  隐瞒了意图╮
    2021-01-18 23:22

    Trap both DiscNotReady (For no disk in the drive), and write Exceptions (For invalid file system/not formatted).

提交回复
热议问题