Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / NetworkInformationException.cs / 1305376 / 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; ////// [Serializable] public class NetworkInformationException : Win32Exception { ////// Provides NetworkInformation exceptions to the application. /// ////// public NetworkInformationException() : base(Marshal.GetLastWin32Error()) { } ////// Creates a new instance of the ///class with the default error code. /// /// public NetworkInformationException(int errorCode) : base(errorCode) { } internal NetworkInformationException(SocketError socketError) : base((int)socketError) { } protected NetworkInformationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } ////// Creates a new instance of the ///class with the specified error code. /// /// 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 // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// 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; ////// [Serializable] public class NetworkInformationException : Win32Exception { ////// Provides NetworkInformation exceptions to the application. /// ////// public NetworkInformationException() : base(Marshal.GetLastWin32Error()) { } ////// Creates a new instance of the ///class with the default error code. /// /// public NetworkInformationException(int errorCode) : base(errorCode) { } internal NetworkInformationException(SocketError socketError) : base((int)socketError) { } protected NetworkInformationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } ////// Creates a new instance of the ///class with the specified error code. /// /// 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 // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TemplateAction.cs
- ReadOnlyDictionary.cs
- ProxyGenerator.cs
- GridItemPatternIdentifiers.cs
- SetStoryboardSpeedRatio.cs
- ObjectDataSourceDisposingEventArgs.cs
- XamlSerializer.cs
- ByeOperationCD1AsyncResult.cs
- ObjectIDGenerator.cs
- ImportCatalogPart.cs
- NameValuePermission.cs
- AssociationSetMetadata.cs
- GridPattern.cs
- DrawToolTipEventArgs.cs
- SafeSecurityHandles.cs
- StorageTypeMapping.cs
- x509utils.cs
- ByteStreamGeometryContext.cs
- DrawingContextWalker.cs
- selecteditemcollection.cs
- TextSyndicationContent.cs
- InternalRelationshipCollection.cs
- Stroke.cs
- MailMessageEventArgs.cs
- pingexception.cs
- XmlSchemaComplexContentExtension.cs
- TargetControlTypeCache.cs
- InputReport.cs
- GiveFeedbackEvent.cs
- AmbientProperties.cs
- LocalizationParserHooks.cs
- SelectedGridItemChangedEvent.cs
- XmlWriterSettings.cs
- DateTimeUtil.cs
- MeasurementDCInfo.cs
- StrongTypingException.cs
- DBPropSet.cs
- DispatcherFrame.cs
- COM2ExtendedUITypeEditor.cs
- CachingHintValidation.cs
- IsolatedStorageFilePermission.cs
- SiteOfOriginPart.cs
- BinaryParser.cs
- BlurBitmapEffect.cs
- CustomValidator.cs
- ZipIOBlockManager.cs
- NoneExcludedImageIndexConverter.cs
- ObjectPropertyMapping.cs
- CipherData.cs
- DataContractSerializerFaultFormatter.cs
- TextBoxRenderer.cs
- LinkLabelLinkClickedEvent.cs
- InputBuffer.cs
- HttpMethodConstraint.cs
- WmlTextViewAdapter.cs
- WebPartActionVerb.cs
- GuidConverter.cs
- SqlCommandBuilder.cs
- ThreadStartException.cs
- ClientSettingsSection.cs
- Section.cs
- CacheEntry.cs
- DataBindingCollectionConverter.cs
- ErrorLog.cs
- BlurEffect.cs
- HtmlElement.cs
- DesignBindingConverter.cs
- LinkedResourceCollection.cs
- XslCompiledTransform.cs
- KeyBinding.cs
- HealthMonitoringSection.cs
- _AutoWebProxyScriptWrapper.cs
- ProcessInputEventArgs.cs
- FixedFindEngine.cs
- COM2PropertyPageUITypeConverter.cs
- SqlConnectionManager.cs
- SafeFileMappingHandle.cs
- GeometryGroup.cs
- SemanticAnalyzer.cs
- TextShapeableCharacters.cs
- AlphabetConverter.cs
- SpellerStatusTable.cs
- SQLDoubleStorage.cs
- SqlClientWrapperSmiStream.cs
- Dispatcher.cs
- XamlToRtfParser.cs
- LineSegment.cs
- MarkupExtensionReturnTypeAttribute.cs
- SafeFileMappingHandle.cs
- CheckBoxBaseAdapter.cs
- InkCanvas.cs
- WebPartDeleteVerb.cs
- OverrideMode.cs
- SecurityTokenSerializer.cs
- DragStartedEventArgs.cs
- BindingUtils.cs
- CompiledRegexRunnerFactory.cs
- ValueCollectionParameterReader.cs
- JsonEncodingStreamWrapper.cs
- ToolboxItemCollection.cs