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
- XmlSignificantWhitespace.cs
- DesignerProperties.cs
- ForceCopyBuildProvider.cs
- PostBackTrigger.cs
- XmlnsPrefixAttribute.cs
- GridViewDeleteEventArgs.cs
- XPathBinder.cs
- ImportCatalogPart.cs
- SettingsBase.cs
- Matrix.cs
- TransactionInterop.cs
- UiaCoreApi.cs
- ResourceReferenceExpression.cs
- TempEnvironment.cs
- SecurityManager.cs
- WindowsToolbarAsMenu.cs
- AspCompat.cs
- ScriptingWebServicesSectionGroup.cs
- ObjectKeyFrameCollection.cs
- ClientOperationFormatterProvider.cs
- ColorAnimationBase.cs
- SoapReflectionImporter.cs
- GroupLabel.cs
- Resources.Designer.cs
- HtmlInputImage.cs
- CompareInfo.cs
- DoubleLinkListEnumerator.cs
- Utils.cs
- EncodingStreamWrapper.cs
- CachedFontFamily.cs
- ScrollBar.cs
- RootBuilder.cs
- FormatException.cs
- EventMappingSettings.cs
- Point4DConverter.cs
- SafeThreadHandle.cs
- ComponentGlyph.cs
- FixUpCollection.cs
- SqlEnums.cs
- Stream.cs
- panel.cs
- TextSpanModifier.cs
- RtfControls.cs
- XmlSchemaProviderAttribute.cs
- basenumberconverter.cs
- QuerySafeNavigator.cs
- Binding.cs
- PopupRoot.cs
- NamespaceExpr.cs
- _ProxyChain.cs
- ContainerParagraph.cs
- CustomTypeDescriptor.cs
- entitydatasourceentitysetnameconverter.cs
- StateChangeEvent.cs
- List.cs
- PerfCounterSection.cs
- ComponentEvent.cs
- Vertex.cs
- InputDevice.cs
- AnimationLayer.cs
- EntityCollectionChangedParams.cs
- DecoratedNameAttribute.cs
- UrlMappingsSection.cs
- XsltSettings.cs
- FixedSOMPageElement.cs
- DbParameterHelper.cs
- Hash.cs
- SelectionPattern.cs
- WorkflowValidationFailedException.cs
- _SafeNetHandles.cs
- BaseServiceProvider.cs
- XmlDigitalSignatureProcessor.cs
- XsdDateTime.cs
- BaseDataListComponentEditor.cs
- AmbientLight.cs
- ResourceReferenceExpression.cs
- GlyphRun.cs
- Parsers.cs
- ProcessHostMapPath.cs
- SettingsPropertyWrongTypeException.cs
- FrameworkTextComposition.cs
- SignatureSummaryDialog.cs
- TextEditorSpelling.cs
- EnumValidator.cs
- WebPartDisplayModeCancelEventArgs.cs
- TypeUtil.cs
- ObjectConverter.cs
- TreeViewEvent.cs
- IpcManager.cs
- FormView.cs
- ConnectionConsumerAttribute.cs
- ListControlStringCollectionEditor.cs
- ClientSideQueueItem.cs
- BasicKeyConstraint.cs
- DataSysAttribute.cs
- ContextMenuStripGroupCollection.cs
- MetadataUtil.cs
- WindowsTreeView.cs
- WaitForChangedResult.cs
- SweepDirectionValidation.cs