Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DataControlImageButton.cs
- TreeView.cs
- TextContainerHelper.cs
- UrlMappingsSection.cs
- DataSourceListEditor.cs
- CodeAttributeArgumentCollection.cs
- ResumeStoryboard.cs
- SQLInt32Storage.cs
- DateTimeConstantAttribute.cs
- DataSvcMapFileSerializer.cs
- ResolveCriteriaApril2005.cs
- MultipleViewProviderWrapper.cs
- CalendarDateRangeChangingEventArgs.cs
- ObfuscateAssemblyAttribute.cs
- RequestQueryProcessor.cs
- CodeSubDirectoriesCollection.cs
- PositiveTimeSpanValidator.cs
- precedingsibling.cs
- RoleGroupCollection.cs
- DataObjectCopyingEventArgs.cs
- CodeTryCatchFinallyStatement.cs
- CultureInfo.cs
- TypeConverterHelper.cs
- DbConnectionPool.cs
- Int32Animation.cs
- ComponentRenameEvent.cs
- EditingMode.cs
- DataTableExtensions.cs
- ItemCheckedEvent.cs
- HttpCookie.cs
- CodeEventReferenceExpression.cs
- TextTreePropertyUndoUnit.cs
- SqlClientWrapperSmiStreamChars.cs
- WorkflowServiceBehavior.cs
- ValidatorCollection.cs
- EntityDataSourceDataSelectionPanel.cs
- _AuthenticationState.cs
- MD5CryptoServiceProvider.cs
- SqlConnectionPoolProviderInfo.cs
- RunInstallerAttribute.cs
- NativeMethods.cs
- Misc.cs
- VectorAnimation.cs
- EmbossBitmapEffect.cs
- ConfigDefinitionUpdates.cs
- SessionStateModule.cs
- Int32Converter.cs
- LinkButton.cs
- TcpChannelHelper.cs
- ProfileSettingsCollection.cs
- MeshGeometry3D.cs
- MenuScrollingVisibilityConverter.cs
- XmlSignatureProperties.cs
- OleDbTransaction.cs
- recordstatefactory.cs
- ComboBoxAutomationPeer.cs
- BindingList.cs
- SQLStringStorage.cs
- CustomTrackingQuery.cs
- OdbcConnectionPoolProviderInfo.cs
- TypeLibConverter.cs
- DataMember.cs
- UnsafeNetInfoNativeMethods.cs
- SafeFileMapViewHandle.cs
- ValueConversionAttribute.cs
- TemporaryBitmapFile.cs
- Hash.cs
- ToggleProviderWrapper.cs
- PropertyManager.cs
- TextFragmentEngine.cs
- SocketElement.cs
- HttpTransportManager.cs
- Token.cs
- NetCodeGroup.cs
- TableItemStyle.cs
- OleCmdHelper.cs
- XMLUtil.cs
- Attributes.cs
- HTMLTagNameToTypeMapper.cs
- AdornerPresentationContext.cs
- UiaCoreProviderApi.cs
- BoolExpressionVisitors.cs
- HtmlControlPersistable.cs
- ToolZone.cs
- XmlArrayItemAttributes.cs
- TextDecorationCollection.cs
- DbParameterCollection.cs
- DataGridCellClipboardEventArgs.cs
- _HTTPDateParse.cs
- EmbossBitmapEffect.cs
- MetaDataInfo.cs
- ValidationSummary.cs
- XmlSchemaValidationException.cs
- UriTemplateLiteralQueryValue.cs
- ItemMap.cs
- ListControl.cs
- ArithmeticLiteral.cs
- XmlNamespaceMappingCollection.cs
- PropertyValueChangedEvent.cs
- TableRowsCollectionEditor.cs