Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / Util / Tuple.cs / 1305376 / Tuple.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Util { using System; internal sealed class Tuple { private object[] _items; public Tuple(params object[] items) { _items = items; } public object this[int index] { get { return _items[index]; } } public override int GetHashCode() { if (_items.Length == 0) return 0; HashCodeCombiner combiner = new HashCodeCombiner(); for (int i = 0; i < _items.Length; i++) { combiner.AddObject(_items[i]); } return combiner.CombinedHash32; } public override bool Equals(object obj) { if (obj == null) return false; Tuple other = (Tuple)obj; if (other == this) return true; if ((other._items.Length != _items.Length)) return false; for (int i = 0; i < _items.Length; i++) { if (!other[i].Equals(this[i])) return false; } return true; } } } // 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
- XmlNavigatorFilter.cs
- CommentEmitter.cs
- DataGridViewHitTestInfo.cs
- WindowsRichEditRange.cs
- DataGridViewColumn.cs
- PopupRootAutomationPeer.cs
- xdrvalidator.cs
- ValidationResult.cs
- ByeMessageApril2005.cs
- TextRunTypographyProperties.cs
- EntitySet.cs
- ExceptionRoutedEventArgs.cs
- Msec.cs
- DESCryptoServiceProvider.cs
- RegistryConfigurationProvider.cs
- DetailsViewCommandEventArgs.cs
- DocumentPageTextView.cs
- EFTableProvider.cs
- HMAC.cs
- _ContextAwareResult.cs
- CookieProtection.cs
- CodeParameterDeclarationExpressionCollection.cs
- HttpCacheVary.cs
- ToolboxItemSnapLineBehavior.cs
- ProcessHostFactoryHelper.cs
- SortQuery.cs
- WebPartConnectVerb.cs
- CopyAttributesAction.cs
- VirtualDirectoryMappingCollection.cs
- AsyncOperationLifetimeManager.cs
- State.cs
- EventProviderWriter.cs
- CodeArrayIndexerExpression.cs
- CodeValidator.cs
- DataGridViewMethods.cs
- MruCache.cs
- ErrorHandler.cs
- EntityDataSourceValidationException.cs
- XmlSchemaSequence.cs
- ProbeMatchesMessageCD1.cs
- _ContextAwareResult.cs
- WebPartConnectionsConnectVerb.cs
- SharedStream.cs
- LeaseManager.cs
- Helpers.cs
- BridgeDataRecord.cs
- controlskin.cs
- FieldAccessException.cs
- JulianCalendar.cs
- DecoderBestFitFallback.cs
- ProbeDuplex11AsyncResult.cs
- UniqueConstraint.cs
- ConstraintManager.cs
- DynamicUpdateCommand.cs
- CollectionBuilder.cs
- BasicAsyncResult.cs
- GorillaCodec.cs
- ConnectionPoolRegistry.cs
- AccessDataSourceWizardForm.cs
- CollectionViewProxy.cs
- MediaElement.cs
- ContentPlaceHolder.cs
- StructureChangedEventArgs.cs
- SyndicationCategory.cs
- MessageBox.cs
- StringPropertyBuilder.cs
- SymbolPair.cs
- Encoder.cs
- NetworkInformationPermission.cs
- AutoGeneratedField.cs
- BaseTemplatedMobileComponentEditor.cs
- exports.cs
- PasswordValidationException.cs
- PropertyStore.cs
- HtmlContainerControl.cs
- EntityClientCacheKey.cs
- ActivityDesignerAccessibleObject.cs
- FormatSettings.cs
- Utils.cs
- CommandField.cs
- ManagementObject.cs
- securitycriticaldataClass.cs
- XmlDesigner.cs
- WebPartExportVerb.cs
- RoutedEventValueSerializer.cs
- DataGridViewTextBoxCell.cs
- ConfigurationSettings.cs
- OleDbErrorCollection.cs
- DataGridViewSelectedColumnCollection.cs
- GenerateScriptTypeAttribute.cs
- SRGSCompiler.cs
- StateMachine.cs
- ContourSegment.cs
- XmlDataCollection.cs
- DataGridViewToolTip.cs
- XmlMembersMapping.cs
- TextRange.cs
- FileVersionInfo.cs
- XamlStream.cs