Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- RuntimeIdentifierPropertyAttribute.cs
- DataService.cs
- RegularExpressionValidator.cs
- RoleService.cs
- SatelliteContractVersionAttribute.cs
- OleDbConnectionInternal.cs
- DataTable.cs
- pingexception.cs
- LingerOption.cs
- QueryCursorEventArgs.cs
- BaseTemplateBuildProvider.cs
- StackBuilderSink.cs
- SafeHandle.cs
- InstanceNotReadyException.cs
- DataShape.cs
- CombinedGeometry.cs
- QueryCacheEntry.cs
- WsatExtendedInformation.cs
- ScaleTransform.cs
- CustomErrorCollection.cs
- ConfigurationManager.cs
- CompressedStack.cs
- AxisAngleRotation3D.cs
- AssociatedControlConverter.cs
- XmlSchemaGroupRef.cs
- FileLoadException.cs
- GroupBoxRenderer.cs
- Ray3DHitTestResult.cs
- ValidationError.cs
- SchemaTypeEmitter.cs
- RepeatButton.cs
- XmlDocument.cs
- ColumnProvider.cs
- ObjectHelper.cs
- PopupRootAutomationPeer.cs
- MembershipUser.cs
- PersistChildrenAttribute.cs
- DependentTransaction.cs
- XmlBinaryWriter.cs
- ChannelManagerBase.cs
- MarkerProperties.cs
- SecurityRuntime.cs
- ClientSettingsStore.cs
- Propagator.Evaluator.cs
- TraceLog.cs
- ModuleConfigurationInfo.cs
- ListViewGroupItemCollection.cs
- Cell.cs
- AbstractExpressions.cs
- TaiwanCalendar.cs
- WebPermission.cs
- ListSourceHelper.cs
- XPathNodeHelper.cs
- DropShadowBitmapEffect.cs
- XmlEntity.cs
- OleDbRowUpdatingEvent.cs
- SubMenuStyleCollection.cs
- VisualStyleRenderer.cs
- ComponentChangingEvent.cs
- WebBrowsableAttribute.cs
- SafeCoTaskMem.cs
- ADRoleFactoryConfiguration.cs
- ValidationSummary.cs
- KeyboardNavigation.cs
- ToolStripDropDownButton.cs
- TextSegment.cs
- RuntimeConfig.cs
- XPathDocument.cs
- FilterEventArgs.cs
- OleDbConnectionFactory.cs
- tabpagecollectioneditor.cs
- MaskDescriptors.cs
- CustomErrorsSection.cs
- KeyValueSerializer.cs
- GetPageCompletedEventArgs.cs
- XamlVector3DCollectionSerializer.cs
- DoubleKeyFrameCollection.cs
- TreeViewImageKeyConverter.cs
- MessageBox.cs
- UnknownBitmapEncoder.cs
- SqlWorkflowInstanceStoreLock.cs
- RelationshipEndCollection.cs
- String.cs
- CollectionBuilder.cs
- CompilerCollection.cs
- KernelTypeValidation.cs
- EntityWrapper.cs
- _IPv4Address.cs
- DesignTimeParseData.cs
- _Rfc2616CacheValidators.cs
- BinaryObjectWriter.cs
- ModuleConfigurationInfo.cs
- PropertyDescriptorGridEntry.cs
- _Rfc2616CacheValidators.cs
- HttpHandlerActionCollection.cs
- _Events.cs
- FontCacheLogic.cs
- ImageCodecInfoPrivate.cs
- ListSortDescription.cs
- HtmlTableCell.cs