Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HandlerBase.cs
- VirtualPath.cs
- Error.cs
- ToolStripPanelRow.cs
- ipaddressinformationcollection.cs
- HtmlElementErrorEventArgs.cs
- DataGridViewMethods.cs
- EntityProviderFactory.cs
- ValidatorUtils.cs
- DockPattern.cs
- UnionExpr.cs
- CustomError.cs
- HtmlElementEventArgs.cs
- DataServiceQueryException.cs
- TransactedBatchContext.cs
- KeyFrames.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- DisplayInformation.cs
- SoundPlayerAction.cs
- PermissionSetTriple.cs
- TcpClientChannel.cs
- CodeExpressionCollection.cs
- AutomationPeer.cs
- QuadraticEase.cs
- VisualStyleTypesAndProperties.cs
- ConnectionPoolManager.cs
- ConfigXmlElement.cs
- QueryConverter.cs
- MaskedTextBoxTextEditorDropDown.cs
- BitmapVisualManager.cs
- DateTimeValueSerializerContext.cs
- PointValueSerializer.cs
- CodeTypeOfExpression.cs
- Thread.cs
- PrimaryKeyTypeConverter.cs
- HostingEnvironmentSection.cs
- StreamGeometryContext.cs
- input.cs
- DateTimeOffset.cs
- Crc32Helper.cs
- Util.cs
- Run.cs
- InputLangChangeRequestEvent.cs
- CommonGetThemePartSize.cs
- ImageListStreamer.cs
- ConfigurationValidatorAttribute.cs
- CellParaClient.cs
- ClientRolePrincipal.cs
- Typography.cs
- ContextBase.cs
- StateValidator.cs
- _SpnDictionary.cs
- WebPartTransformerAttribute.cs
- HtmlTernaryTree.cs
- RowParagraph.cs
- AssemblyResourceLoader.cs
- IPipelineRuntime.cs
- ProxySimple.cs
- StylusPointPropertyInfoDefaults.cs
- NativeRightsManagementAPIsStructures.cs
- ServicePointManagerElement.cs
- WindowsFormsHelpers.cs
- ActivityXamlServices.cs
- TextServicesCompartmentEventSink.cs
- BaseTemplateBuildProvider.cs
- LockCookie.cs
- Model3DGroup.cs
- SupportingTokenSpecification.cs
- ControlCollection.cs
- LongValidator.cs
- ReflectionPermission.cs
- LinqDataSourceDeleteEventArgs.cs
- SiteMapNodeItemEventArgs.cs
- SlipBehavior.cs
- MarkupCompiler.cs
- SoapObjectWriter.cs
- ExpandedProjectionNode.cs
- ContextMarshalException.cs
- DataSourceSelectArguments.cs
- SynchronizationLockException.cs
- DataGridViewColumnCollection.cs
- MimeImporter.cs
- QilInvokeLateBound.cs
- MetadataHelper.cs
- CodeExpressionCollection.cs
- Main.cs
- MeshGeometry3D.cs
- CacheForPrimitiveTypes.cs
- UndirectedGraph.cs
- MenuItemCollection.cs
- KnowledgeBase.cs
- GridViewColumnHeader.cs
- Win32Native.cs
- UniqueIdentifierService.cs
- Pkcs9Attribute.cs
- XmlNodeChangedEventManager.cs
- WebPartExportVerb.cs
- QualificationDataAttribute.cs
- WebPartUserCapability.cs
- ControlParameter.cs