Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Sockets / IPPacketInformation.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AuthenticationModuleElementCollection.cs
- SymbolMethod.cs
- ButtonFieldBase.cs
- MethodSet.cs
- OLEDB_Util.cs
- DataGridTextColumn.cs
- Base64Encoding.cs
- InspectionWorker.cs
- ControlIdConverter.cs
- XmlDownloadManager.cs
- TypeUnloadedException.cs
- ClonableStack.cs
- SaveWorkflowCommand.cs
- StrongName.cs
- WpfXamlLoader.cs
- StringValidator.cs
- ExpandSegment.cs
- FlowLayout.cs
- IList.cs
- SafeNativeMethodsMilCoreApi.cs
- WorkerRequest.cs
- Vector3DConverter.cs
- UIntPtr.cs
- AnchoredBlock.cs
- WindowsTokenRoleProvider.cs
- DBParameter.cs
- SimpleLine.cs
- BamlRecordReader.cs
- SequentialOutput.cs
- StaticFileHandler.cs
- ItemsChangedEventArgs.cs
- ClaimTypeElement.cs
- MimeBasePart.cs
- PathNode.cs
- ImageMap.cs
- MethodSignatureGenerator.cs
- XmlCodeExporter.cs
- OracleSqlParser.cs
- ControlType.cs
- ByteAnimationUsingKeyFrames.cs
- Quad.cs
- SystemWebCachingSectionGroup.cs
- EdmPropertyAttribute.cs
- InertiaExpansionBehavior.cs
- XPathDocumentIterator.cs
- SqlReorderer.cs
- WebPartEditorCancelVerb.cs
- TextPattern.cs
- CalloutQueueItem.cs
- XmlWrappingWriter.cs
- Bind.cs
- StrokeSerializer.cs
- SessionSwitchEventArgs.cs
- RewritingValidator.cs
- DataGridViewLinkColumn.cs
- TransactionContextValidator.cs
- fixedPageContentExtractor.cs
- Sequence.cs
- httpstaticobjectscollection.cs
- DoubleLinkListEnumerator.cs
- RegisteredHiddenField.cs
- SoapReflector.cs
- Utils.cs
- COM2Properties.cs
- ObjectHandle.cs
- PlaceHolder.cs
- GridProviderWrapper.cs
- AttachedAnnotationChangedEventArgs.cs
- CodeLinePragma.cs
- TypeSchema.cs
- LightweightEntityWrapper.cs
- GregorianCalendar.cs
- Context.cs
- DBConcurrencyException.cs
- BuildResult.cs
- WebBrowserSiteBase.cs
- StringAnimationBase.cs
- ClaimTypes.cs
- GPRECTF.cs
- NativeMethods.cs
- RC2CryptoServiceProvider.cs
- SystemMulticastIPAddressInformation.cs
- MouseEvent.cs
- DirectionalLight.cs
- QueryResponse.cs
- PasswordRecovery.cs
- Blend.cs
- InheritanceRules.cs
- LoginAutoFormat.cs
- PrintingPermission.cs
- _SslStream.cs
- WebPartVerbCollection.cs
- RijndaelManagedTransform.cs
- EventManager.cs
- DelegatingConfigHost.cs
- TransformValueSerializer.cs
- EntityTypeEmitter.cs
- UriWriter.cs
- Form.cs
- SqlTypeSystemProvider.cs