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
- RootBrowserWindowAutomationPeer.cs
- TypeEnumerableViewSchema.cs
- EllipseGeometry.cs
- PropertyManager.cs
- ColorMatrix.cs
- TabletCollection.cs
- SamlDelegatingWriter.cs
- SecurityTokenProvider.cs
- TextBlock.cs
- InkPresenterAutomationPeer.cs
- DbReferenceCollection.cs
- LongValidatorAttribute.cs
- altserialization.cs
- FlagsAttribute.cs
- CodeLabeledStatement.cs
- ComponentRenameEvent.cs
- CodeTypeDeclaration.cs
- StandardOleMarshalObject.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- CharAnimationUsingKeyFrames.cs
- LayoutDump.cs
- ProtectedConfigurationProviderCollection.cs
- XmlImplementation.cs
- ComponentResourceKeyConverter.cs
- SQLGuid.cs
- KeyboardEventArgs.cs
- XmlNodeList.cs
- IndexOutOfRangeException.cs
- DictationGrammar.cs
- TemplatedWizardStep.cs
- PreviewControlDesigner.cs
- HttpAsyncResult.cs
- CodeVariableReferenceExpression.cs
- FormatControl.cs
- CaseInsensitiveOrdinalStringComparer.cs
- RootBrowserWindow.cs
- LogicalTreeHelper.cs
- StrokeNodeOperations2.cs
- SafeIUnknown.cs
- DataGridViewComboBoxCell.cs
- NeutralResourcesLanguageAttribute.cs
- DependencyObjectPropertyDescriptor.cs
- SizeConverter.cs
- PriorityItem.cs
- DataGridViewCellLinkedList.cs
- DateTimeValueSerializerContext.cs
- SqlVersion.cs
- DataReceivedEventArgs.cs
- XPathScanner.cs
- ApplicationHost.cs
- MediaPlayerState.cs
- TraceSwitch.cs
- WebPartManager.cs
- RadioButtonPopupAdapter.cs
- XmlAtomicValue.cs
- ResourcePool.cs
- TranslateTransform3D.cs
- XmlDeclaration.cs
- TypeHelper.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- FolderBrowserDialog.cs
- Baml6ConstructorInfo.cs
- SqlExpander.cs
- Compiler.cs
- NameValueCollection.cs
- HandleCollector.cs
- AndCondition.cs
- ToolStripPanelDesigner.cs
- DataBoundControlHelper.cs
- SQLStringStorage.cs
- DefaultBindingPropertyAttribute.cs
- ConditionValidator.cs
- Image.cs
- objectresult_tresulttype.cs
- SequentialActivityDesigner.cs
- ArgIterator.cs
- ProviderUtil.cs
- SimpleTypeResolver.cs
- ClientScriptManagerWrapper.cs
- TypeLibConverter.cs
- IssuedTokenClientElement.cs
- BindingContext.cs
- DataTableTypeConverter.cs
- MessageDecoder.cs
- TableCellAutomationPeer.cs
- InputEventArgs.cs
- ProgressBar.cs
- UnionExpr.cs
- ADMembershipProvider.cs
- StaticExtensionConverter.cs
- OrthographicCamera.cs
- GcSettings.cs
- ToggleButtonAutomationPeer.cs
- HttpCachePolicy.cs
- EntityContainerEntitySet.cs
- PlainXmlWriter.cs
- ExpressionList.cs
- SqlNode.cs
- SoapInteropTypes.cs
- WebOperationContext.cs