Classe IOException
Aggiornamento: novembre 2007
Eccezione generata quando si verifica un errore di I/O.
Assembly: mscorlib (in mscorlib.dll)
IOException è la classe base per le eccezioni generate durante l'accesso a informazioni tramite flussi, file e directory.
La libreria di classi base include i tipi indicati di seguito, ciascuno dei quali è una classe derivata da IOException:
Dove opportuno, utilizzare questi tipi anziché IOException.
IOException utilizza HRESULT COR_E_IO, con valore 0x80131620.
Questo esempio di codice fa parte di un esempio più esaustivo fornito per il metodo FileStream.Lock.
// Catch the IOException generated if the // specified part of the file is locked. catch(IOException e) { Console.WriteLine( "{0}: The write operation could not " + "be performed because the specified " + "part of the file is locked.", e.GetType().Name); }
// Catch the IOException generated if the
// specified part of the file is locked.
catch(IOException e) {
Console.WriteLine(
"{0}: The write operation could not "
+ "be performed because the specified "
+ "part of the file is locked.",
e.GetType().get_Name());
}
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition , Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile per Smartphone, Windows Mobile per Pocket PC, Xbox 360
.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.