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
- Opcode.cs
- JsonDataContract.cs
- ActiveXSite.cs
- CodeTypeReferenceExpression.cs
- PipelineModuleStepContainer.cs
- LocalFileSettingsProvider.cs
- SafeProcessHandle.cs
- AttributeUsageAttribute.cs
- QuaternionAnimationBase.cs
- DbProviderConfigurationHandler.cs
- X509ChainElement.cs
- ReadOnlyMetadataCollection.cs
- TextWriterEngine.cs
- DXD.cs
- MasterPage.cs
- ButtonChrome.cs
- Clipboard.cs
- OutputBuffer.cs
- VisualCollection.cs
- SamlAttribute.cs
- OleDbCommandBuilder.cs
- METAHEADER.cs
- SessionStateUtil.cs
- ObjectDataSource.cs
- RequestResizeEvent.cs
- ValueCollectionParameterReader.cs
- Message.cs
- DataTableTypeConverter.cs
- DataServiceBehavior.cs
- SqlWebEventProvider.cs
- RandomNumberGenerator.cs
- SqlProcedureAttribute.cs
- TemplatePropertyEntry.cs
- CounterSampleCalculator.cs
- Binding.cs
- CircleHotSpot.cs
- MouseDevice.cs
- ByteRangeDownloader.cs
- HttpCapabilitiesEvaluator.cs
- PointConverter.cs
- DispatcherProcessingDisabled.cs
- ScopelessEnumAttribute.cs
- ListViewItem.cs
- TabletDevice.cs
- ResolveCriteriaCD1.cs
- ResourceWriter.cs
- HtmlElement.cs
- HelpKeywordAttribute.cs
- EditorPartChrome.cs
- Expression.cs
- assemblycache.cs
- securitymgrsite.cs
- MatcherBuilder.cs
- SubMenuStyle.cs
- IMembershipProvider.cs
- ContentPlaceHolder.cs
- InheritanceContextHelper.cs
- DependencyPropertyChangedEventArgs.cs
- EntityDesignerUtils.cs
- Activity.cs
- MimePart.cs
- WebPartEventArgs.cs
- TransformProviderWrapper.cs
- XmlQuerySequence.cs
- TableStyle.cs
- ToolboxItemFilterAttribute.cs
- SqlFlattener.cs
- SqlEnums.cs
- ColorAnimation.cs
- EntryWrittenEventArgs.cs
- AdPostCacheSubstitution.cs
- TemplateKey.cs
- XmlAttributeOverrides.cs
- PolygonHotSpot.cs
- InternalCache.cs
- FixedFlowMap.cs
- ColumnBinding.cs
- RoutedPropertyChangedEventArgs.cs
- CatalogPartCollection.cs
- MultiView.cs
- CommandEventArgs.cs
- DictionaryTraceRecord.cs
- Int64AnimationUsingKeyFrames.cs
- ErrorWrapper.cs
- OleDbFactory.cs
- EntityType.cs
- SafeHandle.cs
- SecurityTokenReferenceStyle.cs
- ExpandCollapsePatternIdentifiers.cs
- AsyncOperationManager.cs
- UICuesEvent.cs
- ColumnPropertiesGroup.cs
- PenContext.cs
- ContentDefinition.cs
- DbSource.cs
- QueryContinueDragEventArgs.cs
- MailWebEventProvider.cs
- RtfControls.cs
- NamespaceList.cs
- XPathException.cs