Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / Util / Pair.cs / 1 / Pair.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Util { using System; // Generic Pair class. Overrides Equals() and GetHashCode(), so it can be used as a dictionary key. internal sealed class Pair{ private readonly TFirst _first; private readonly TSecond _second; public Pair(TFirst first, TSecond second) { if (first == null) { throw new ArgumentNullException("first"); } if (second == null) { throw new ArgumentNullException("second"); } _first = first; _second = second; } public TFirst First { get { return _first; } } public TSecond Second { get { return _second; } } public override bool Equals(object obj) { if (obj == this) { return true; } Pair other = obj as Pair ; return (other != null) && (other._first.Equals(_first)) && (other._second.Equals(_second)); } public override int GetHashCode() { int a = _first.GetHashCode(); return HashCodeCombiner.CombineHashCodes(a, _second.GetHashCode()); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- base64Transforms.cs
- DescendentsWalkerBase.cs
- SQLDateTime.cs
- PreservationFileWriter.cs
- WindowsEditBox.cs
- WindowsFormsLinkLabel.cs
- PageBreakRecord.cs
- NameService.cs
- BigInt.cs
- FixedSOMSemanticBox.cs
- InteropExecutor.cs
- NetTcpBindingElement.cs
- BinaryWriter.cs
- AspNetRouteServiceHttpHandler.cs
- LineProperties.cs
- ITreeGenerator.cs
- XsdDataContractExporter.cs
- ScaleTransform3D.cs
- ImageIndexConverter.cs
- StyleSheetDesigner.cs
- CodeArgumentReferenceExpression.cs
- Polyline.cs
- CompositeFontFamily.cs
- ConnectionStringsExpressionBuilder.cs
- DrawToolTipEventArgs.cs
- TableRowsCollectionEditor.cs
- TextBoxAutomationPeer.cs
- PartialCachingAttribute.cs
- ImplicitInputBrush.cs
- PkcsMisc.cs
- Vector3DConverter.cs
- SiteMapNodeItemEventArgs.cs
- QueryInterceptorAttribute.cs
- TrackingRecord.cs
- DataReaderContainer.cs
- PolicyStatement.cs
- ArrangedElementCollection.cs
- InvalidOleVariantTypeException.cs
- DataGridViewRowsRemovedEventArgs.cs
- RoutingSection.cs
- RSACryptoServiceProvider.cs
- InputBinding.cs
- DesignerGeometryHelper.cs
- HebrewNumber.cs
- CountdownEvent.cs
- GPRECT.cs
- PointAnimation.cs
- IsolatedStorage.cs
- Hyperlink.cs
- FormViewUpdatedEventArgs.cs
- Asn1IntegerConverter.cs
- ActiveXContainer.cs
- ReceiveErrorHandling.cs
- PasswordBox.cs
- ACE.cs
- XmlSchemaObject.cs
- ReadOnlyPropertyMetadata.cs
- ChangeInterceptorAttribute.cs
- ResolveCriteriaCD1.cs
- CollectionViewSource.cs
- ProfileGroupSettingsCollection.cs
- TableParagraph.cs
- CustomAttributeFormatException.cs
- MeasureData.cs
- CollectionChangedEventManager.cs
- AnnotationComponentManager.cs
- VisualState.cs
- InitializerFacet.cs
- ExpressionBindingCollection.cs
- FileDialogCustomPlacesCollection.cs
- OdbcStatementHandle.cs
- CachedPathData.cs
- LinkDescriptor.cs
- PersianCalendar.cs
- BoundPropertyEntry.cs
- DataControlFieldCollection.cs
- KeyValueSerializer.cs
- XPathCompileException.cs
- MutexSecurity.cs
- Native.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- RemotingHelper.cs
- LinqDataSourceSelectEventArgs.cs
- DataGridViewMethods.cs
- StrongName.cs
- BinaryMethodMessage.cs
- EndOfStreamException.cs
- HtmlContainerControl.cs
- Deflater.cs
- PackageDigitalSignatureManager.cs
- SchemaNamespaceManager.cs
- XpsFilter.cs
- ApplySecurityAndSendAsyncResult.cs
- Compensation.cs
- CodeValidator.cs
- ReferenceSchema.cs
- AccessDataSourceWizardForm.cs
- ProcessProtocolHandler.cs
- JournalEntryListConverter.cs
- DefaultBindingPropertyAttribute.cs