Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Sockets / IPPacketInformation.cs / 1305376 / 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
- TypeElement.cs
- httpapplicationstate.cs
- DesignerTextViewAdapter.cs
- SpellerStatusTable.cs
- BindingExpressionBase.cs
- ProfileSection.cs
- EasingFunctionBase.cs
- DataExpression.cs
- ConfigurationSectionCollection.cs
- BinaryReader.cs
- MatrixCamera.cs
- Size3DConverter.cs
- HijriCalendar.cs
- ResolvePPIDRequest.cs
- StorageFunctionMapping.cs
- MsmqIntegrationChannelListener.cs
- CellRelation.cs
- RemoteHelper.cs
- MSHTMLHostUtil.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- HostedTransportConfigurationManager.cs
- Pointer.cs
- SessionSwitchEventArgs.cs
- ProtocolElement.cs
- CustomAttributeFormatException.cs
- Boolean.cs
- Visitors.cs
- PropertyGeneratedEventArgs.cs
- infer.cs
- DATA_BLOB.cs
- GridViewSortEventArgs.cs
- xml.cs
- SharedDp.cs
- Region.cs
- SqlDataRecord.cs
- TableProvider.cs
- ValueOfAction.cs
- SoapExtensionImporter.cs
- DrawingContextWalker.cs
- Transform.cs
- DataGrid.cs
- Size.cs
- BooleanFacetDescriptionElement.cs
- ApplicationDirectory.cs
- AuthorizationRule.cs
- ContextStack.cs
- EventProviderTraceListener.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- AttributeQuery.cs
- GridViewItemAutomationPeer.cs
- DataBinder.cs
- DocumentDesigner.cs
- Converter.cs
- SecurityContextSecurityToken.cs
- MetadataItemCollectionFactory.cs
- VisualProxy.cs
- CodeVariableReferenceExpression.cs
- ComplexPropertyEntry.cs
- MergePropertyDescriptor.cs
- DataSourceView.cs
- SafeNativeMethods.cs
- VBCodeProvider.cs
- IgnoreFileBuildProvider.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- HMACMD5.cs
- RsaSecurityKey.cs
- WindowsListViewGroupHelper.cs
- ISFClipboardData.cs
- TextPointerBase.cs
- DbDataReader.cs
- UnsettableComboBox.cs
- XPathNodeInfoAtom.cs
- XmlHierarchyData.cs
- SudsWriter.cs
- XmlILOptimizerVisitor.cs
- SerializableAttribute.cs
- ResolvedKeyFrameEntry.cs
- MinMaxParagraphWidth.cs
- ConsoleKeyInfo.cs
- SqlBuilder.cs
- MoveSizeWinEventHandler.cs
- IntSecurity.cs
- ConfigXmlText.cs
- EmptyImpersonationContext.cs
- DataGridLinkButton.cs
- VariableReference.cs
- Policy.cs
- DigitShape.cs
- Random.cs
- XmlSchemaSimpleTypeRestriction.cs
- CompleteWizardStep.cs
- CompositeControl.cs
- ScrollItemPattern.cs
- QueueProcessor.cs
- MappingException.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- EntityUtil.cs
- ButtonPopupAdapter.cs
- ComponentResourceKeyConverter.cs
- KeyInfo.cs