Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Net / System / Net / Sockets / IPPacketInformation.cs / 1 / IPPacketInformation.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System.Net; public struct IPPacketInformation { IPAddress address; int networkInterface; internal IPPacketInformation(IPAddress address, int networkInterface){ this.address = address; this.networkInterface = networkInterface; } public IPAddress Address { get{ return address; } } public int Interface { get{ return networkInterface; } } public static bool operator == (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return packetInformation1.Equals(packetInformation2); } public static bool operator != (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return !packetInformation1.Equals(packetInformation2); } public override bool Equals(object comparand) { if ((object) comparand == null) { return false; } if (!(comparand is IPPacketInformation)) return false; IPPacketInformation obj = (IPPacketInformation) comparand; if (address.Equals(obj.address) && networkInterface == obj.networkInterface) return (true); return false; } public override int GetHashCode() { return address.GetHashCode() + networkInterface.GetHashCode(); } }; // enum SocketFlags } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System.Net; public struct IPPacketInformation { IPAddress address; int networkInterface; internal IPPacketInformation(IPAddress address, int networkInterface){ this.address = address; this.networkInterface = networkInterface; } public IPAddress Address { get{ return address; } } public int Interface { get{ return networkInterface; } } public static bool operator == (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return packetInformation1.Equals(packetInformation2); } public static bool operator != (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return !packetInformation1.Equals(packetInformation2); } public override bool Equals(object comparand) { if ((object) comparand == null) { return false; } if (!(comparand is IPPacketInformation)) return false; IPPacketInformation obj = (IPPacketInformation) comparand; if (address.Equals(obj.address) && networkInterface == obj.networkInterface) return (true); return false; } public override int GetHashCode() { return address.GetHashCode() + networkInterface.GetHashCode(); } }; // enum SocketFlags } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BooleanConverter.cs
- ComponentFactoryHelpers.cs
- NavigationService.cs
- DefaultSettingsSection.cs
- PrintPreviewControl.cs
- TextRangeEditLists.cs
- CompositionDesigner.cs
- TextInfo.cs
- WebBaseEventKeyComparer.cs
- LineServicesRun.cs
- ContextMenu.cs
- SelectingProviderEventArgs.cs
- ColumnMapVisitor.cs
- SymmetricCryptoHandle.cs
- PersonalizableTypeEntry.cs
- WebPartChrome.cs
- ReadContentAsBinaryHelper.cs
- TextBoxBase.cs
- UInt64.cs
- LiteralControl.cs
- SqlDataReaderSmi.cs
- WasEndpointConfigContainer.cs
- UIElementHelper.cs
- TableProviderWrapper.cs
- DataGridViewComboBoxCell.cs
- RectConverter.cs
- TextElementAutomationPeer.cs
- ProfileSection.cs
- MobileControlsSectionHelper.cs
- WebPartDisplayModeCollection.cs
- TableSectionStyle.cs
- ToolStripContentPanelRenderEventArgs.cs
- ApplicationHost.cs
- ObsoleteAttribute.cs
- WpfMemberInvoker.cs
- DataKey.cs
- XamlVector3DCollectionSerializer.cs
- AuthenticateEventArgs.cs
- PixelFormat.cs
- Compiler.cs
- SchemaImporterExtensionElement.cs
- Base64Stream.cs
- ExtractedStateEntry.cs
- FileSystemWatcher.cs
- XPathItem.cs
- OverflowException.cs
- CurrentChangingEventArgs.cs
- SectionVisual.cs
- DatatypeImplementation.cs
- BackgroundWorker.cs
- DataListAutoFormat.cs
- DetectEofStream.cs
- TimeManager.cs
- BooleanKeyFrameCollection.cs
- BrowsableAttribute.cs
- CharAnimationBase.cs
- NodeInfo.cs
- HotSpotCollection.cs
- GraphicsContainer.cs
- ClientApiGenerator.cs
- NavigationProgressEventArgs.cs
- Helpers.cs
- XPathParser.cs
- wmiprovider.cs
- StylusPointPropertyInfoDefaults.cs
- PathNode.cs
- isolationinterop.cs
- WebPartTracker.cs
- XmlNullResolver.cs
- ArithmeticException.cs
- DictionarySectionHandler.cs
- XmlArrayItemAttributes.cs
- AddressAlreadyInUseException.cs
- ClientSideProviderDescription.cs
- XmlExceptionHelper.cs
- HtmlElement.cs
- ProviderException.cs
- CodeTypeMember.cs
- ContainerParaClient.cs
- PrePostDescendentsWalker.cs
- SQLInt16.cs
- MultitargetingHelpers.cs
- Descriptor.cs
- CatalogZone.cs
- X509AsymmetricSecurityKey.cs
- WebAdminConfigurationHelper.cs
- DoubleIndependentAnimationStorage.cs
- Scalars.cs
- DefaultDialogButtons.cs
- Point3D.cs
- FormsAuthenticationUser.cs
- InfoCardAsymmetricCrypto.cs
- Quad.cs
- QueryOpcode.cs
- AssemblyBuilderData.cs
- InvalidComObjectException.cs
- BaseProcessProtocolHandler.cs
- PlainXmlDeserializer.cs
- UnknownWrapper.cs
- TemplatePropertyEntry.cs