Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / xsp / System / Web / Extensions / Util / Tuple.cs / 1 / 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. //------------------------------------------------------------------------------ //// 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
- FixedTextView.cs
- Types.cs
- CapabilitiesUse.cs
- EventItfInfo.cs
- DefaultProfileManager.cs
- HtmlTable.cs
- ELinqQueryState.cs
- MenuItemCollection.cs
- ExpanderAutomationPeer.cs
- InputDevice.cs
- MobileContainerDesigner.cs
- XmlSchemaSimpleContent.cs
- SspiSafeHandles.cs
- HyperLinkColumn.cs
- CompositeControlDesigner.cs
- TimestampInformation.cs
- LoginNameDesigner.cs
- CodeBinaryOperatorExpression.cs
- SmtpFailedRecipientException.cs
- BamlLocalizableResource.cs
- WebPartRestoreVerb.cs
- ViewBox.cs
- VisualBasicDesignerHelper.cs
- LinearGradientBrush.cs
- MimeTypePropertyAttribute.cs
- LayoutEngine.cs
- RemotingConfiguration.cs
- PackagingUtilities.cs
- TextDecoration.cs
- ExpressionEditor.cs
- TimelineClockCollection.cs
- ButtonChrome.cs
- Point3DAnimationUsingKeyFrames.cs
- RuntimeConfigurationRecord.cs
- DataGridViewBindingCompleteEventArgs.cs
- ISFTagAndGuidCache.cs
- BuildResultCache.cs
- XmlBufferReader.cs
- ViewStateChangedEventArgs.cs
- RepeatButton.cs
- DataGridItemCollection.cs
- _FixedSizeReader.cs
- Button.cs
- TriggerAction.cs
- UriTemplateLiteralQueryValue.cs
- XmlWriterSettings.cs
- LoginUtil.cs
- ObjectDataSourceMethodEventArgs.cs
- DefaultHttpHandler.cs
- CellParaClient.cs
- WinInetCache.cs
- SimpleHandlerFactory.cs
- TransactionInterop.cs
- MetafileHeader.cs
- SynchronizedInputAdaptor.cs
- TextSyndicationContentKindHelper.cs
- WebBrowserDocumentCompletedEventHandler.cs
- SectionInformation.cs
- _NetRes.cs
- CompilationRelaxations.cs
- SqlMethodTransformer.cs
- TypeViewSchema.cs
- WebBaseEventKeyComparer.cs
- TraceUtils.cs
- SoapException.cs
- _ScatterGatherBuffers.cs
- DesignTimeVisibleAttribute.cs
- UpdateCommandGenerator.cs
- TransformerInfoCollection.cs
- InheritanceAttribute.cs
- GetWinFXPath.cs
- NativeMethods.cs
- SoapCodeExporter.cs
- CharEntityEncoderFallback.cs
- AppDomain.cs
- WebPartChrome.cs
- Unit.cs
- VirtualPath.cs
- CharacterMetricsDictionary.cs
- ClientConfigPaths.cs
- XmlReader.cs
- DownloadProgressEventArgs.cs
- AnimationLayer.cs
- MultiPropertyDescriptorGridEntry.cs
- AppSettingsExpressionBuilder.cs
- CompoundFileStorageReference.cs
- TextDecorationUnitValidation.cs
- TokenBasedSet.cs
- LeafCellTreeNode.cs
- AlphaSortedEnumConverter.cs
- ServiceActivationException.cs
- CollectionEditorDialog.cs
- DrawListViewItemEventArgs.cs
- BindingManagerDataErrorEventArgs.cs
- BindingGroup.cs
- ValidationHelper.cs
- XPathDocumentBuilder.cs
- ConfigurationManagerHelperFactory.cs
- EventLogSession.cs
- NotifyParentPropertyAttribute.cs