Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SignatureDescription.cs
- StateRuntime.cs
- TypeListConverter.cs
- XmlDocumentFragment.cs
- MaskDescriptor.cs
- Point3DKeyFrameCollection.cs
- ClassDataContract.cs
- XPathNodeList.cs
- ToolStripSystemRenderer.cs
- HandlerBase.cs
- WorkflowInstanceRecord.cs
- InternalConfigRoot.cs
- InputBindingCollection.cs
- PagePropertiesChangingEventArgs.cs
- CodeAttachEventStatement.cs
- RelatedImageListAttribute.cs
- RenderData.cs
- EntitySetBase.cs
- MemberListBinding.cs
- _ShellExpression.cs
- ColorPalette.cs
- DiscreteKeyFrames.cs
- OneOfScalarConst.cs
- IpcManager.cs
- StrokeNodeEnumerator.cs
- RegexReplacement.cs
- UpdateException.cs
- DBCommandBuilder.cs
- Expressions.cs
- StrokeNodeOperations.cs
- ComponentManagerBroker.cs
- LinqDataSourceSelectEventArgs.cs
- SQLInt32Storage.cs
- Int16Converter.cs
- FirstMatchCodeGroup.cs
- DataTableCollection.cs
- CustomActivityDesigner.cs
- SelectionBorderGlyph.cs
- DataRelationCollection.cs
- safemediahandle.cs
- BuildResult.cs
- Helpers.cs
- FlowDocumentView.cs
- AutomationPropertyInfo.cs
- EventDescriptor.cs
- WebPartDescriptionCollection.cs
- SafeHandles.cs
- DataGridViewColumnEventArgs.cs
- DataGridViewToolTip.cs
- _AutoWebProxyScriptWrapper.cs
- SecurityCriticalDataForSet.cs
- PermissionAttributes.cs
- rsa.cs
- DataGridLength.cs
- PolyBezierSegmentFigureLogic.cs
- AsymmetricCryptoHandle.cs
- ClassicBorderDecorator.cs
- PasswordPropertyTextAttribute.cs
- Rect3D.cs
- TreeNodeStyle.cs
- TCPClient.cs
- SqlStream.cs
- RemoveFromCollection.cs
- CommentGlyph.cs
- QueueProcessor.cs
- AssemblyAttributesGoHere.cs
- GridView.cs
- MetadataItem.cs
- IQueryable.cs
- BmpBitmapDecoder.cs
- CFGGrammar.cs
- TargetException.cs
- TypedTableBase.cs
- NavigationCommands.cs
- DataServiceEntityAttribute.cs
- UnauthorizedWebPart.cs
- Accessible.cs
- Int16Converter.cs
- BlurBitmapEffect.cs
- InheritablePropertyChangeInfo.cs
- HwndProxyElementProvider.cs
- LoadWorkflowByInstanceKeyCommand.cs
- HtmlLink.cs
- ControlCollection.cs
- DataGridViewAccessibleObject.cs
- DecodeHelper.cs
- Double.cs
- ParserContext.cs
- DeobfuscatingStream.cs
- WebPartVerbCollection.cs
- OrderedDictionary.cs
- ScrollItemProviderWrapper.cs
- CriticalFinalizerObject.cs
- SplitterEvent.cs
- RtfControls.cs
- InlineObject.cs
- ReliableSessionElement.cs
- WebBrowserNavigatingEventHandler.cs
- RawUIStateInputReport.cs
- WindowsSlider.cs