Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / Base / Shared / Internal / EqualityArray.cs / 1305376 / EqualityArray.cs
namespace System.Activities.Presentation.Internal { using System.Diagnostics; using System.Runtime; // // An EqualityArray is an array of objects whose // .Equals method runs against all items in the // array. It is assumed that the data input // into the array is constant. We use this in attributes // to offer a quick and accurate TypeId property. // internal class EqualityArray { private object[] _values; internal EqualityArray(params object[] values) { _values = values; Fx.Assert(_values != null && _values.Length > 0, "EqualityArray expects at least one value"); } public override bool Equals(object other) { EqualityArray otherArray = other as EqualityArray; if (otherArray == null) return false; if (otherArray._values.Length != _values.Length) return false; for (int idx = 0; idx < _values.Length; idx++) { if (_values[idx] != otherArray._values[idx]) return false; } return true; } public override int GetHashCode() { return _values[0].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
- entityreference_tresulttype.cs
- ValueQuery.cs
- UnsafeNativeMethods.cs
- CalloutQueueItem.cs
- TraceListeners.cs
- EmptyStringExpandableObjectConverter.cs
- DataSourceControlBuilder.cs
- Debugger.cs
- CmsInterop.cs
- XmlCodeExporter.cs
- StrongNameUtility.cs
- ServiceManagerHandle.cs
- SerializationEventsCache.cs
- NameValueConfigurationCollection.cs
- PropertyInformation.cs
- NativeMethods.cs
- BezierSegment.cs
- ClipboardData.cs
- ModuleBuilderData.cs
- PropertyNames.cs
- QueueProcessor.cs
- CurrencyManager.cs
- AffineTransform3D.cs
- XD.cs
- IgnoreDeviceFilterElement.cs
- SqlConnectionPoolGroupProviderInfo.cs
- StylusPointPropertyUnit.cs
- RC2CryptoServiceProvider.cs
- ReflectionHelper.cs
- HandoffBehavior.cs
- ScanQueryOperator.cs
- LinkArea.cs
- TemplateKeyConverter.cs
- ThreadInterruptedException.cs
- XhtmlBasicValidatorAdapter.cs
- XmlReaderSettings.cs
- ListViewTableCell.cs
- ExceptionUtil.cs
- SettingsContext.cs
- AuthenticationModuleElementCollection.cs
- DbParameterCollectionHelper.cs
- Base64Stream.cs
- BamlRecordWriter.cs
- Collection.cs
- DataSourceView.cs
- XmlSignatureManifest.cs
- PageContentAsyncResult.cs
- InputBindingCollection.cs
- MessageDescription.cs
- XmlRawWriter.cs
- ControlIdConverter.cs
- SaveFileDialog.cs
- DataServices.cs
- GeneratedCodeAttribute.cs
- ViewGenResults.cs
- PointLightBase.cs
- SharedStream.cs
- Comparer.cs
- WinFormsSecurity.cs
- CompositionTarget.cs
- PartialCachingControl.cs
- DataGridViewTextBoxEditingControl.cs
- StateRuntime.cs
- XmlText.cs
- PointCollection.cs
- SByteConverter.cs
- StylusPointProperties.cs
- PasswordDeriveBytes.cs
- DataGridViewCellValueEventArgs.cs
- PropertyInfoSet.cs
- CompModHelpers.cs
- AsymmetricKeyExchangeFormatter.cs
- ErrorWebPart.cs
- TypefaceCollection.cs
- namescope.cs
- RbTree.cs
- WebPartConnectionsConfigureVerb.cs
- PackageFilter.cs
- ThumbButtonInfoCollection.cs
- PseudoWebRequest.cs
- WindowsGraphicsCacheManager.cs
- SqlTypesSchemaImporter.cs
- FixedPage.cs
- ItemsPanelTemplate.cs
- NonBatchDirectoryCompiler.cs
- Span.cs
- InternalCache.cs
- QilInvoke.cs
- ToolStripKeyboardHandlingService.cs
- SemanticResultValue.cs
- HttpPostProtocolReflector.cs
- DbUpdateCommandTree.cs
- OperationInvokerBehavior.cs
- TableHeaderCell.cs
- CultureTable.cs
- Translator.cs
- ProxySimple.cs
- WebMethodAttribute.cs
- SharedStatics.cs
- UpDownEvent.cs