Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / IO / DirectoryNotFoundException.cs / 1 / DirectoryNotFoundException.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: DirectoryNotFoundException
**
**
** Purpose: Exception for accessing a path that doesn't exist.
**
**
===========================================================*/
using System;
using System.Runtime.Serialization;
namespace System.IO {
/*
* Thrown when trying to access a directory that doesn't exist on disk.
* From COM Interop, this exception is thrown for 2 HRESULTS:
* the Win32 errorcode-as-HRESULT ERROR_PATH_NOT_FOUND (0x80070003)
* and STG_E_PATHNOTFOUND (0x80030003).
*/
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class DirectoryNotFoundException : IOException {
public DirectoryNotFoundException()
: base(Environment.GetResourceString("Arg_DirectoryNotFoundException")) {
SetErrorCode(__HResults.COR_E_DIRECTORYNOTFOUND);
}
public DirectoryNotFoundException(String message)
: base(message) {
SetErrorCode(__HResults.COR_E_DIRECTORYNOTFOUND);
}
public DirectoryNotFoundException(String message, Exception innerException)
: base(message, innerException) {
SetErrorCode(__HResults.COR_E_DIRECTORYNOTFOUND);
}
protected DirectoryNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) {
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebZone.cs
- PointAnimationUsingKeyFrames.cs
- DBBindings.cs
- RTTrackingProfile.cs
- ComponentResourceKey.cs
- CalendarButtonAutomationPeer.cs
- TextElement.cs
- Grant.cs
- SqlConnectionStringBuilder.cs
- CommonDialog.cs
- DynamicPropertyReader.cs
- DataGridViewMethods.cs
- HtmlShimManager.cs
- x509utils.cs
- HttpModulesSection.cs
- CodeAccessSecurityEngine.cs
- MeshGeometry3D.cs
- CompilationRelaxations.cs
- CriticalExceptions.cs
- NavigationFailedEventArgs.cs
- EntryIndex.cs
- ToolBarPanel.cs
- WebPartRestoreVerb.cs
- ExpressionEditorAttribute.cs
- XappLauncher.cs
- SpecularMaterial.cs
- EnglishPluralizationService.cs
- FileAccessException.cs
- SortedList.cs
- Stream.cs
- HTMLTextWriter.cs
- Journaling.cs
- QilTargetType.cs
- PanelStyle.cs
- InkPresenter.cs
- XamlVector3DCollectionSerializer.cs
- WebEventCodes.cs
- WindowsFormsHost.cs
- XPathAncestorQuery.cs
- CalendarDataBindingHandler.cs
- ParserStreamGeometryContext.cs
- ConfigurationElementProperty.cs
- DocComment.cs
- IgnoreSectionHandler.cs
- XXXOnTypeBuilderInstantiation.cs
- NotImplementedException.cs
- ObservableCollection.cs
- FileEnumerator.cs
- MergablePropertyAttribute.cs
- QueryContinueDragEvent.cs
- FixedSOMTable.cs
- TextTreeTextBlock.cs
- DataContractSerializer.cs
- ServicePointManagerElement.cs
- ExceptionAggregator.cs
- PageCodeDomTreeGenerator.cs
- MembershipAdapter.cs
- ContentElementAutomationPeer.cs
- Permission.cs
- Form.cs
- SqlUserDefinedAggregateAttribute.cs
- SpeechEvent.cs
- Gdiplus.cs
- StrokeNode.cs
- SafeThemeHandle.cs
- EncoderParameters.cs
- IIS7UserPrincipal.cs
- NamespaceExpr.cs
- ListViewItem.cs
- CompositeScriptReference.cs
- SByteConverter.cs
- WindowsGraphicsCacheManager.cs
- DataBoundControlHelper.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- DiscoveryClientProtocol.cs
- TableItemPattern.cs
- sortedlist.cs
- ReadWriteObjectLock.cs
- XmlSchemaCollection.cs
- NetworkStream.cs
- WebPartDescription.cs
- XmlSchemaAttributeGroupRef.cs
- WebBrowserUriTypeConverter.cs
- AsmxEndpointPickerExtension.cs
- FileSystemInfo.cs
- GridViewRowPresenter.cs
- SelectedDatesCollection.cs
- ConnectionStringsExpressionBuilder.cs
- TextDecorations.cs
- NameValueSectionHandler.cs
- ColorDialog.cs
- DataShape.cs
- XmlSchemaParticle.cs
- ValidationErrorCollection.cs
- WindowsListView.cs
- GraphicsContainer.cs
- ReliabilityContractAttribute.cs
- CodeDelegateCreateExpression.cs
- ExpressionHelper.cs
- AdornedElementPlaceholder.cs