Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / xsp / System / Web / Extensions / Util / Tuple.cs / 2 / 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
- WhileDesigner.cs
- TTSEngineProxy.cs
- AlignmentXValidation.cs
- WindowsGraphics2.cs
- Tokenizer.cs
- SQLCharsStorage.cs
- WebPartEditorCancelVerb.cs
- ScaleTransform.cs
- HexParser.cs
- PropertyInfoSet.cs
- LabelExpression.cs
- BroadcastEventHelper.cs
- Floater.cs
- OleDbCommandBuilder.cs
- SslStreamSecurityBindingElement.cs
- ValueConversionAttribute.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- Context.cs
- ConfigPathUtility.cs
- WorkerRequest.cs
- ECDiffieHellmanPublicKey.cs
- OSFeature.cs
- ModulesEntry.cs
- TextEditorTables.cs
- SemaphoreSecurity.cs
- ScrollProperties.cs
- TextDecorationCollection.cs
- CompoundFileStreamReference.cs
- CodeExpressionStatement.cs
- ItemCheckedEvent.cs
- TextPointer.cs
- UIElementPropertyUndoUnit.cs
- PreviewPageInfo.cs
- Clipboard.cs
- SiteMapNodeItemEventArgs.cs
- FormattedTextSymbols.cs
- DataPagerCommandEventArgs.cs
- ScrollPattern.cs
- ListView.cs
- CustomAttributeFormatException.cs
- FrameworkTextComposition.cs
- SequenceDesignerAccessibleObject.cs
- LazyInitializer.cs
- HtmlDocument.cs
- ReferencedAssemblyResolver.cs
- AdRotator.cs
- ColorAnimationBase.cs
- ListItemsPage.cs
- Group.cs
- XmlEntity.cs
- DetailsViewDeleteEventArgs.cs
- XPathArrayIterator.cs
- CollectionDataContractAttribute.cs
- FormatterConverter.cs
- Mappings.cs
- ScrollContentPresenter.cs
- EntityStoreSchemaFilterEntry.cs
- QilUnary.cs
- Translator.cs
- columnmapkeybuilder.cs
- ManagedFilter.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- TemplateParser.cs
- BinaryReader.cs
- Messages.cs
- MultipartIdentifier.cs
- PopupEventArgs.cs
- DBSchemaTable.cs
- TextBreakpoint.cs
- CollectionViewGroupRoot.cs
- RTTypeWrapper.cs
- LoginUtil.cs
- PermissionListSet.cs
- FormsAuthenticationModule.cs
- RuleElement.cs
- ProtocolsInstallComponent.cs
- mactripleDES.cs
- DnsElement.cs
- ResourcesBuildProvider.cs
- StrokeRenderer.cs
- TdsParameterSetter.cs
- IPGlobalProperties.cs
- BaseUriHelper.cs
- DataStreamFromComStream.cs
- CultureInfoConverter.cs
- HandleRef.cs
- MULTI_QI.cs
- ComplexObject.cs
- DateTimeFormatInfoScanner.cs
- SettingsBindableAttribute.cs
- GridViewDeleteEventArgs.cs
- ContentType.cs
- CqlParser.cs
- ObjectAnimationUsingKeyFrames.cs
- TemplateNameScope.cs
- Pens.cs
- UTF7Encoding.cs
- FixedStringLookup.cs
- Marshal.cs
- FastPropertyAccessor.cs