DirectoryNotFoundException, classe
System.Exception
System.SystemException
System.IO.IOException
System.IO.DirectoryNotFoundException
Espace de noms : System.IO
Assembly : mscorlib (dans mscorlib.dll)
Le type DirectoryNotFoundException expose les membres suivants.
| Nom | Description | |
|---|---|---|
![]() ![]() | DirectoryNotFoundException() | |
![]() ![]() | DirectoryNotFoundException(String) | |
![]() | DirectoryNotFoundException(SerializationInfo, StreamingContext) | |
![]() | DirectoryNotFoundException(String, Exception) |
| Nom | Description | |
|---|---|---|
![]() | Data | |
![]() | HelpLink | |
![]() ![]() | HResult | |
![]() ![]() | InnerException | |
![]() ![]() | Message | |
![]() | Source | |
![]() ![]() | StackTrace | |
![]() | TargetSite |
| Nom | Description | |
|---|---|---|
![]() ![]() | Equals(Object) | |
![]() ![]() | Finalize | |
![]() ![]() | GetBaseException | |
![]() ![]() | GetHashCode | |
![]() | GetObjectData | |
![]() ![]() | GetType | Dans XNA Framework 3.0, ce membre est hérité de Object.GetType(). |
![]() ![]() | MemberwiseClone | |
![]() ![]() | ToString |
| Nom | Description | |
|---|---|---|
![]() | SerializeObjectState |
using System; using System.IO; class Program { static void Main(string[] args) { try { // Specify a directory name that does not exist for this demo. string dir = @"c:\78fe9lk"; // If this directory does not exist, a DirectoryNotFoundException is thrown // when attempting to set the current directory. Directory.SetCurrentDirectory(dir); } catch (DirectoryNotFoundException dirEx) { // Let the user know that the directory did not exist. Console.WriteLine("Directory not found: " + dirEx.Message); } } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.




