IOException Class
.NET Framework 3.0
The exception that is thrown when an I/O error occurs.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly: mscorlib (in mscorlib.dll)
[SerializableAttribute] [ComVisibleAttribute(true)] public class IOException : SystemException
/** @attribute SerializableAttribute() */ /** @attribute ComVisibleAttribute(true) */ public class IOException extends SystemException
SerializableAttribute ComVisibleAttribute(true) public class IOException extends SystemException
Not applicable.
IOException is the base class for exceptions thrown while accessing information using streams, files and directories.
The Base Class Library includes the following types, each of which is a derived class of IOException :
Where appropriate, use these types instead of IOException.
IOException uses the HRESULT COR_E_IO which has the value 0x80131620.
This code example is part of a larger example provided for the FileStream.Lock method.
// 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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: