当其显示“设备尚未准备就绪"时, .NET中的错误消息 [英] when it shows "Device is not ready" error message in .NET
本文介绍了当其显示“设备尚未准备就绪"时, .NET中的错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道何时引发设备未准备好"异常.
我可以使用DriveInfo类将其抛出.如果是,怎么办?
在此先感谢:)
I would like to know when it throws "Device Is not ready" exception.
can I throw it using DriveInfo class. If yes how?
Thanks in Advance :)
推荐答案
查看 ^ ]方法和 IOException [ ^ ]类.
然后,您可以制作一个
Look at DriveInfo.GetDrives[^] Method and IOException[^] Class.
You can then make a
throw new IOException("The device is not ready.");
或检查 DriveInfo.IsReady [
Or check DriveInfo.IsReady[^]
这篇关于当其显示“设备尚未准备就绪"时, .NET中的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文