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
- Rfc2898DeriveBytes.cs
- WpfPayload.cs
- Matrix.cs
- HMACSHA1.cs
- HandlerWithFactory.cs
- PropertiesTab.cs
- ToolboxItemFilterAttribute.cs
- XPathDescendantIterator.cs
- StringHandle.cs
- ProfileInfo.cs
- HttpGetClientProtocol.cs
- FixUp.cs
- SequenceFullException.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- DynamicRendererThreadManager.cs
- WindowsImpersonationContext.cs
- DataGridTablesFactory.cs
- _ServiceNameStore.cs
- FunctionMappingTranslator.cs
- ElementMarkupObject.cs
- objectresult_tresulttype.cs
- TextSelectionProcessor.cs
- XmlNodeChangedEventArgs.cs
- SerializationInfoEnumerator.cs
- SqlHelper.cs
- WebPartZoneCollection.cs
- FactoryGenerator.cs
- CustomBindingElementCollection.cs
- TimeSpanValidatorAttribute.cs
- WebPartZone.cs
- RequiredArgumentAttribute.cs
- HtmlTableRow.cs
- TextBoxBase.cs
- XmlSchemaObjectCollection.cs
- DocumentPaginator.cs
- ApplicationManager.cs
- XmlSchemaNotation.cs
- DocumentsTrace.cs
- SqlConnection.cs
- DateTime.cs
- UTF8Encoding.cs
- Visual.cs
- Attachment.cs
- ObjectToModelValueConverter.cs
- TextParagraph.cs
- DefaultAssemblyResolver.cs
- XamlWriter.cs
- ConfigViewGenerator.cs
- CachedTypeface.cs
- StreamReader.cs
- DataListCommandEventArgs.cs
- UnsafeNativeMethodsCLR.cs
- ScrollPattern.cs
- EraserBehavior.cs
- ASCIIEncoding.cs
- SelectionService.cs
- CodeMemberField.cs
- TableItemPattern.cs
- Application.cs
- ErrorsHelper.cs
- UshortList2.cs
- IsolatedStorageFileStream.cs
- RequestStatusBarUpdateEventArgs.cs
- UriTemplateDispatchFormatter.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- securitycriticaldataformultiplegetandset.cs
- HttpClientCredentialType.cs
- Vertex.cs
- BooleanKeyFrameCollection.cs
- ServiceEndpointCollection.cs
- CacheMemory.cs
- Vector3DCollectionConverter.cs
- LedgerEntryCollection.cs
- UrlPropertyAttribute.cs
- XmlSchemaAppInfo.cs
- Win32Interop.cs
- RangeExpression.cs
- SecurityState.cs
- LocationReferenceEnvironment.cs
- FixUpCollection.cs
- Point4D.cs
- PasswordDeriveBytes.cs
- BamlWriter.cs
- HttpTransportElement.cs
- Pool.cs
- RelationshipWrapper.cs
- RemotingConfigParser.cs
- Rectangle.cs
- XmlWriterSettings.cs
- FormParameter.cs
- PropertyCondition.cs
- ObjectQuery.cs
- XmlDataSourceView.cs
- Ref.cs
- DuplicateDetector.cs
- ControlAdapter.cs
- NavigationHelper.cs
- ListViewCommandEventArgs.cs
- Point3D.cs
- StringSource.cs