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
- JsonCollectionDataContract.cs
- MergablePropertyAttribute.cs
- AutomationProperty.cs
- MdiWindowListStrip.cs
- RenderTargetBitmap.cs
- ConfigsHelper.cs
- TextTreeInsertUndoUnit.cs
- StaticSiteMapProvider.cs
- SharedUtils.cs
- StylusPointProperties.cs
- SqlInternalConnection.cs
- ListViewContainer.cs
- XmlSerializerAssemblyAttribute.cs
- __Error.cs
- Task.cs
- HttpListener.cs
- ZipIOExtraFieldZip64Element.cs
- ContextMenuStrip.cs
- AssertFilter.cs
- Binding.cs
- CachedFontFamily.cs
- Group.cs
- RouteData.cs
- TreeViewHitTestInfo.cs
- WebException.cs
- SinglePhaseEnlistment.cs
- Process.cs
- LogicalExpr.cs
- BamlResourceContent.cs
- ThicknessAnimation.cs
- SerTrace.cs
- RegexMatch.cs
- ReadOnlyCollectionBuilder.cs
- TypeHelper.cs
- OfTypeExpression.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- HtmlHistory.cs
- ApplicationTrust.cs
- CompatibleComparer.cs
- RoutedEventHandlerInfo.cs
- InvalidContentTypeException.cs
- TextEndOfParagraph.cs
- ImageField.cs
- XmlImplementation.cs
- HtmlInputReset.cs
- VoiceChangeEventArgs.cs
- CharacterBuffer.cs
- SymbolType.cs
- AssemblyNameUtility.cs
- HtmlCommandAdapter.cs
- AuthenticatedStream.cs
- ModelUIElement3D.cs
- XsltSettings.cs
- Stack.cs
- Walker.cs
- StructuralCache.cs
- BaseParser.cs
- HelpOperationInvoker.cs
- MessageEncodingBindingElement.cs
- DesignBindingEditor.cs
- Material.cs
- MultiBinding.cs
- FontStyle.cs
- PageSetupDialog.cs
- ArgIterator.cs
- TraceHwndHost.cs
- SetIndexBinder.cs
- SqlDataSourceSelectingEventArgs.cs
- Errors.cs
- FloatUtil.cs
- Size.cs
- EntityStoreSchemaFilterEntry.cs
- dbenumerator.cs
- Vertex.cs
- SplashScreenNativeMethods.cs
- GradientSpreadMethodValidation.cs
- ContractDescription.cs
- VisualStyleRenderer.cs
- ProxyElement.cs
- AuthorizationSection.cs
- HttpValueCollection.cs
- ToolStripDropTargetManager.cs
- XmlWhitespace.cs
- ParserStack.cs
- ForwardPositionQuery.cs
- ISFClipboardData.cs
- TextAutomationPeer.cs
- Int64Converter.cs
- TextFormattingConverter.cs
- UseAttributeSetsAction.cs
- ToolboxComponentsCreatingEventArgs.cs
- FixedSOMTableRow.cs
- ConnectorDragDropGlyph.cs
- RelatedPropertyManager.cs
- MediaElementAutomationPeer.cs
- Storyboard.cs
- DataGridCellEditEndingEventArgs.cs
- StringWriter.cs
- PropertyRecord.cs
- CodeRemoveEventStatement.cs