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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ValidationErrorInfo.cs
- KnownTypes.cs
- Preprocessor.cs
- MULTI_QI.cs
- StorageEntityContainerMapping.cs
- WorkflowInstanceContextProvider.cs
- UnionCodeGroup.cs
- ScriptingJsonSerializationSection.cs
- ToolStripRendererSwitcher.cs
- HtmlGenericControl.cs
- MgmtResManager.cs
- IssuedTokensHeader.cs
- HotCommands.cs
- FormatterConverter.cs
- BlurEffect.cs
- Object.cs
- SchemaImporterExtensionsSection.cs
- ClientSponsor.cs
- ProvidersHelper.cs
- ParallelTimeline.cs
- StringFunctions.cs
- TypeLibConverter.cs
- AlternationConverter.cs
- StorageFunctionMapping.cs
- KeyGesture.cs
- Configuration.cs
- AppSecurityManager.cs
- EnumerableWrapperWeakToStrong.cs
- TextElement.cs
- SymLanguageVendor.cs
- Util.cs
- DataSourceXmlAttributeAttribute.cs
- StylusDevice.cs
- PenLineCapValidation.cs
- unsafenativemethodstextservices.cs
- PageAsyncTaskManager.cs
- DataGridColumnCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- LineUtil.cs
- EdmFunctionAttribute.cs
- _RequestCacheProtocol.cs
- ButtonChrome.cs
- UidManager.cs
- AttachedPropertyDescriptor.cs
- OdbcConnectionString.cs
- CapabilitiesPattern.cs
- WebContentFormatHelper.cs
- MetadataHelper.cs
- SchemaNames.cs
- AttachmentCollection.cs
- CollectionExtensions.cs
- ParsedAttributeCollection.cs
- VersionUtil.cs
- JavascriptCallbackMessageInspector.cs
- ResourceReader.cs
- ProjectionPruner.cs
- ToolStripButton.cs
- StyleHelper.cs
- CancellationTokenRegistration.cs
- SoapRpcMethodAttribute.cs
- AspCompat.cs
- HttpCacheVary.cs
- TextBlock.cs
- FontDialog.cs
- WebPartConnectionsDisconnectVerb.cs
- FreezableCollection.cs
- FormClosedEvent.cs
- BitStream.cs
- SubpageParagraph.cs
- IdentityModelStringsVersion1.cs
- ExceptionUtil.cs
- DesignerValidatorAdapter.cs
- XamlSerializer.cs
- _NtlmClient.cs
- MethodRental.cs
- TextOnlyOutput.cs
- AdRotatorDesigner.cs
- HtmlTableRowCollection.cs
- HttpRuntimeSection.cs
- SamlNameIdentifierClaimResource.cs
- CurrencyWrapper.cs
- Group.cs
- BmpBitmapDecoder.cs
- Point3DCollectionValueSerializer.cs
- TextTreeUndo.cs
- ListViewItemSelectionChangedEvent.cs
- XmlSchemaSimpleTypeList.cs
- PrinterSettings.cs
- ObjectRef.cs
- EpmCustomContentSerializer.cs
- SafeHandles.cs
- RegexCompiler.cs
- dataSvcMapFileLoader.cs
- MenuCommandsChangedEventArgs.cs
- Int16Converter.cs
- LinqDataView.cs
- SerializationTrace.cs
- NullExtension.cs
- FacetDescriptionElement.cs
- DocumentViewerAutomationPeer.cs