Assembly : mscorlib (dans mscorlib.dll)
Syntaxe<SerializableAttribute> _ <ComVisibleAttribute(True)> _ Public Class IOException Inherits SystemException
Dim instance As IOException
[SerializableAttribute] [ComVisibleAttribute(true)] public class IOException : SystemException
[SerializableAttribute] [ComVisibleAttribute(true)] public ref class IOException : public SystemException
/** @attribute SerializableAttribute() */ /** @attribute ComVisibleAttribute(true) */ public class IOException extends SystemException
SerializableAttribute ComVisibleAttribute(true) public class IOException extends SystemException
NotesIOException est la classe de base des exceptions levées lors de l'accès aux informations à l'aide de flux, de fichiers et de répertoires.
La bibliothèque des classes de base comprend les types suivants, chacun d'eux étant une classe dérivée de IOException :
Si cela est approprié, utilisez ces types plutôt que IOException.
IOException utilise le HRESULT COR_E_IO dont la valeur est 0x80131620.
ExempleCet exemple de code fait partie d'un exemple plus développé fourni pour la méthode FileStream.Lock.
' Catch the IOException generated if the ' specified part of the file is locked. Catch ex As IOException Console.WriteLine( _ "{0}: The write operation could " & _ "not be performed because the " & _ "specified part of the file is " & _ "locked.", ex.GetType().Name) End Try
// 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()->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()); }
Sécurité des threads
Plates-formesWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile pour Pocket PC, Windows Mobile pour Smartphone, Windows Server 2003, Windows XP Édition Media Center, Windows XP Professionnel Édition x64, Windows XP SP2, Windows XP Starter Edition
Le .NET Framework ne prend pas en charge toutes les versions de chaque plate-forme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise.
Informations de version
Outils (masquer)
S'enregistrer
Liste des Membres
Qui est en ligne?
FAQ