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
- XmlParser.cs
- Dynamic.cs
- OracleConnectionFactory.cs
- LongMinMaxAggregationOperator.cs
- SwitchAttribute.cs
- WSFederationHttpBindingElement.cs
- PixelShader.cs
- MetaColumn.cs
- UInt64.cs
- FormatVersion.cs
- MemberInitExpression.cs
- TextChange.cs
- Enum.cs
- CommandTreeTypeHelper.cs
- OracleBFile.cs
- HandledEventArgs.cs
- QueryCreatedEventArgs.cs
- ManagementObject.cs
- AttributeProviderAttribute.cs
- DependencyProperty.cs
- TransformerConfigurationWizardBase.cs
- ThemeInfoAttribute.cs
- DropShadowBitmapEffect.cs
- UIPropertyMetadata.cs
- WebPartEditVerb.cs
- UTF32Encoding.cs
- HiddenField.cs
- FileChangesMonitor.cs
- XmlSequenceWriter.cs
- TypedAsyncResult.cs
- ListBoxItemAutomationPeer.cs
- XslTransform.cs
- TripleDESCryptoServiceProvider.cs
- BitmapEffectInput.cs
- ModelChangedEventArgsImpl.cs
- SqlBuffer.cs
- DataGridViewCheckBoxColumn.cs
- HttpCacheVaryByContentEncodings.cs
- DataObjectEventArgs.cs
- ClientSettingsStore.cs
- InputProcessorProfiles.cs
- GridLengthConverter.cs
- NonParentingControl.cs
- CreateUserWizardStep.cs
- CodeTypeParameter.cs
- CachedTypeface.cs
- AbandonedMutexException.cs
- VerticalAlignConverter.cs
- SimpleMailWebEventProvider.cs
- KnownBoxes.cs
- IdentityNotMappedException.cs
- ListViewGroupConverter.cs
- ListViewHitTestInfo.cs
- Char.cs
- HorizontalAlignConverter.cs
- SystemColors.cs
- Material.cs
- BindingExpressionBase.cs
- HttpChannelBindingToken.cs
- DataRowView.cs
- ControlType.cs
- WorkflowRequestContext.cs
- FrameworkObject.cs
- Table.cs
- XmlStreamStore.cs
- RedirectionProxy.cs
- DecimalAnimationBase.cs
- ValueTable.cs
- XmlDataSourceNodeDescriptor.cs
- OutgoingWebResponseContext.cs
- BlurBitmapEffect.cs
- __ComObject.cs
- MailHeaderInfo.cs
- Point.cs
- IISMapPath.cs
- InteropExecutor.cs
- XmlEnumAttribute.cs
- ActionMessageFilterTable.cs
- CompilerWrapper.cs
- TypeSystem.cs
- Page.cs
- ProxyWebPart.cs
- WebPartConnectionsEventArgs.cs
- ToolStripItemDesigner.cs
- InterleavedZipPartStream.cs
- DataGridViewAddColumnDialog.cs
- BindingExpressionBase.cs
- GlobalizationSection.cs
- ImportedPolicyConversionContext.cs
- DbCommandDefinition.cs
- DataGridViewRowEventArgs.cs
- DocumentReferenceCollection.cs
- DiagnosticsElement.cs
- AutomationEvent.cs
- Control.cs
- HttpConfigurationContext.cs
- IdleTimeoutMonitor.cs
- WorkflowValidationFailedException.cs
- LinearGradientBrush.cs
- LogLogRecordHeader.cs