Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / NetworkInformation / NetworkInformationException.cs / 1 / NetworkInformationException.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net.NetworkInformation {
using System;
using System.ComponentModel;
using System.Net.Sockets;
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
///
///
/// Provides NetworkInformation exceptions to the application.
///
///
[Serializable]
public class NetworkInformationException : Win32Exception {
///
///
/// Creates a new instance of the class with the default error code.
///
///
public NetworkInformationException() : base(Marshal.GetLastWin32Error()) {
}
///
///
/// Creates a new instance of the class with the specified error code.
///
///
public NetworkInformationException(int errorCode) : base(errorCode) {
}
internal NetworkInformationException(SocketError socketError) : base((int)socketError) {
}
protected NetworkInformationException(SerializationInfo serializationInfo, StreamingContext streamingContext)
: base(serializationInfo, streamingContext) {
}
///
/// [To be supplied.]
///
public override int ErrorCode {
//
// the base class returns the HResult with this property
// we need the Win32 Error Code, hence the override.
//
get {
return NativeErrorCode;
}
}
}; // class NetworkInformationException
} // namespace System.Net.NetworkInformation
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewCellValidatingEventArgs.cs
- EmissiveMaterial.cs
- ShaperBuffers.cs
- XmlSchemaComplexContent.cs
- StubHelpers.cs
- NumericUpDownAcceleration.cs
- ConstructorBuilder.cs
- AspNetSynchronizationContext.cs
- Document.cs
- ClientSettings.cs
- UnauthorizedWebPart.cs
- UpdateProgress.cs
- SymbolEqualComparer.cs
- InternalBufferManager.cs
- DbProviderManifest.cs
- EmptyStringExpandableObjectConverter.cs
- InheritablePropertyChangeInfo.cs
- CommandPlan.cs
- RowCache.cs
- BooleanConverter.cs
- MarkupCompiler.cs
- mda.cs
- WrappedIUnknown.cs
- InkPresenterAutomationPeer.cs
- TextServicesLoader.cs
- EventlogProvider.cs
- ToolStripGrip.cs
- FontCollection.cs
- PassportAuthentication.cs
- RoutingEndpointTrait.cs
- MetadataWorkspace.cs
- ToolboxBitmapAttribute.cs
- GrammarBuilderWildcard.cs
- OracleInternalConnection.cs
- HotCommands.cs
- DesignSurfaceCollection.cs
- EntityStoreSchemaFilterEntry.cs
- MexBindingBindingCollectionElement.cs
- StylusPointDescription.cs
- AssemblyCollection.cs
- Light.cs
- FormatConvertedBitmap.cs
- RecognizerStateChangedEventArgs.cs
- ComponentCache.cs
- BezierSegment.cs
- PropertyRef.cs
- Vector3DCollectionConverter.cs
- Translator.cs
- ContentPlaceHolderDesigner.cs
- ThreadSafeList.cs
- Freezable.cs
- XamlGridLengthSerializer.cs
- COM2Enum.cs
- InputDevice.cs
- AutoResizedEvent.cs
- ComboBoxItem.cs
- HashMembershipCondition.cs
- XPathAxisIterator.cs
- versioninfo.cs
- ExpressionBuilderCollection.cs
- SourceSwitch.cs
- AppDomainProtocolHandler.cs
- SQLSingle.cs
- ControlAdapter.cs
- PropertyEmitter.cs
- JsonDataContract.cs
- StorageEntityContainerMapping.cs
- QuotedPrintableStream.cs
- EditorPartDesigner.cs
- DataStreamFromComStream.cs
- TemplateNameScope.cs
- BitmapDecoder.cs
- DataGridItemCollection.cs
- InstanceKey.cs
- DependencyObjectPropertyDescriptor.cs
- HttpResponseHeader.cs
- DeploymentExceptionMapper.cs
- ToggleButton.cs
- IOThreadTimer.cs
- HtmlTitle.cs
- GorillaCodec.cs
- SchemaType.cs
- WebUtil.cs
- ZoneLinkButton.cs
- Menu.cs
- Form.cs
- DataGridViewSortCompareEventArgs.cs
- TypeElementCollection.cs
- TextTreeTextBlock.cs
- SemaphoreSlim.cs
- WebServiceClientProxyGenerator.cs
- ClockController.cs
- DataViewListener.cs
- ProcessHostMapPath.cs
- CodeAttributeArgumentCollection.cs
- EndpointDiscoveryBehavior.cs
- xamlnodes.cs
- CharacterShapingProperties.cs
- SafeNativeMethodsOther.cs
- ContravarianceAdapter.cs