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
- ProfileEventArgs.cs
- SignatureGenerator.cs
- ColumnResizeAdorner.cs
- WSHttpBinding.cs
- CompositeCollection.cs
- PermissionAttributes.cs
- HttpDictionary.cs
- DoubleSumAggregationOperator.cs
- NullRuntimeConfig.cs
- SystemColors.cs
- AccessedThroughPropertyAttribute.cs
- xmlformatgeneratorstatics.cs
- Query.cs
- AlphabeticalEnumConverter.cs
- TypeLibConverter.cs
- ArrayListCollectionBase.cs
- WebConfigurationHostFileChange.cs
- SrgsRulesCollection.cs
- _SslStream.cs
- ControlTemplate.cs
- SingleQueryOperator.cs
- SolidColorBrush.cs
- PhysicalFontFamily.cs
- TextTreeNode.cs
- XmlILOptimizerVisitor.cs
- SeekStoryboard.cs
- LocatorPart.cs
- SpecialNameAttribute.cs
- RoutedEventHandlerInfo.cs
- DuplexSecurityProtocolFactory.cs
- BreadCrumbTextConverter.cs
- MasterPageParser.cs
- TypedElement.cs
- PersonalizationDictionary.cs
- FixedLineResult.cs
- ConfigurationValidatorBase.cs
- XmlDataCollection.cs
- SwitchLevelAttribute.cs
- ConfigXmlComment.cs
- OptimizedTemplateContentHelper.cs
- OutputScopeManager.cs
- QuaternionKeyFrameCollection.cs
- Operator.cs
- MethodCallConverter.cs
- ProjectionCamera.cs
- SetIterators.cs
- ChangePassword.cs
- DataGridViewBindingCompleteEventArgs.cs
- LambdaExpression.cs
- PaintValueEventArgs.cs
- PersonalizableTypeEntry.cs
- elementinformation.cs
- ContextQuery.cs
- Bits.cs
- InfoCardSymmetricAlgorithm.cs
- SaveFileDialog.cs
- XhtmlStyleClass.cs
- TreeNode.cs
- BinaryMessageFormatter.cs
- DotAtomReader.cs
- TokenBasedSetEnumerator.cs
- RadioButton.cs
- DataGridViewCellStyle.cs
- UnsafeNativeMethods.cs
- TextFormatter.cs
- FixedSOMGroup.cs
- ChangeNode.cs
- ConfigsHelper.cs
- AppDomainUnloadedException.cs
- RoutedEvent.cs
- AttributeCollection.cs
- WebPartDescriptionCollection.cs
- VSDExceptions.cs
- UserThread.cs
- ListMarkerSourceInfo.cs
- QuadraticBezierSegment.cs
- TextEditor.cs
- NavigationPropertyEmitter.cs
- GlobalProxySelection.cs
- LabelEditEvent.cs
- contentDescriptor.cs
- __ComObject.cs
- WindowsSolidBrush.cs
- SelectionListComponentEditor.cs
- JsonFaultDetail.cs
- Route.cs
- LambdaCompiler.Lambda.cs
- FileRecordSequenceCompletedAsyncResult.cs
- Calendar.cs
- PropertyRef.cs
- PointIndependentAnimationStorage.cs
- VarInfo.cs
- DataServiceQueryException.cs
- NumberFormatter.cs
- Span.cs
- NumberFormatter.cs
- AnnotationComponentManager.cs
- IdentifierService.cs
- SchemaElementDecl.cs
- ChtmlSelectionListAdapter.cs