Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / Microsoft / Scripting / Utils / ReferenceEqualityComparer.cs / 1305376 / ReferenceEqualityComparer.cs
/* **************************************************************************** * * Copyright (c) Microsoft Corporation. * * This source code is subject to terms and conditions of the Microsoft Public License. A * copy of the license can be found in the License.html file at the root of this distribution. If * you cannot locate the Microsoft Public License, please send an email to * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound * by the terms of the Microsoft Public License. * * You must not remove this notice, or any other, from this software. * * * ***************************************************************************/ using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Dynamic.Utils { internal sealed class ReferenceEqualityComparer: IEqualityComparer { internal static readonly ReferenceEqualityComparer Instance = new ReferenceEqualityComparer (); private ReferenceEqualityComparer() { } public bool Equals(T x, T y) { return object.ReferenceEquals(x, y); } public int GetHashCode(T obj) { return RuntimeHelpers.GetHashCode(obj); } } } // 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
- SelectionRangeConverter.cs
- FrameworkContentElement.cs
- RichTextBoxConstants.cs
- CookieProtection.cs
- MapPathBasedVirtualPathProvider.cs
- FlowDocument.cs
- TemplateBindingExpression.cs
- XmlSchemaAnyAttribute.cs
- SiteMapNodeItem.cs
- clipboard.cs
- DelegateArgumentReference.cs
- TypeDelegator.cs
- InvalidDataContractException.cs
- DesigntimeLicenseContext.cs
- ConsoleKeyInfo.cs
- FollowerQueueCreator.cs
- RadioButtonPopupAdapter.cs
- MembershipUser.cs
- Dump.cs
- PropagatorResult.cs
- ObjectDataSourceDesigner.cs
- DeleteIndexBinder.cs
- ListItemCollection.cs
- VoiceChangeEventArgs.cs
- CodeAttributeArgumentCollection.cs
- LogEntry.cs
- PeerCustomResolverSettings.cs
- CollectionBuilder.cs
- TextSchema.cs
- ContainsSearchOperator.cs
- CannotUnloadAppDomainException.cs
- GlyphRunDrawing.cs
- Table.cs
- MessagePropertyVariants.cs
- InkPresenterAutomationPeer.cs
- ManagementOperationWatcher.cs
- Duration.cs
- ProfileEventArgs.cs
- DataGridViewIntLinkedList.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- DbLambda.cs
- ViewGenResults.cs
- ListCollectionView.cs
- Grid.cs
- GeometryGroup.cs
- BitArray.cs
- ActiveDocumentEvent.cs
- Executor.cs
- MsmqIntegrationSecurity.cs
- SqlUserDefinedAggregateAttribute.cs
- LassoSelectionBehavior.cs
- RegexGroupCollection.cs
- WhitespaceRule.cs
- ServiceAuthorizationManager.cs
- FrameSecurityDescriptor.cs
- DataSourceProvider.cs
- XmlSerializerSection.cs
- TextWriter.cs
- FixedSOMTable.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- OTFRasterizer.cs
- TreeNodeStyleCollection.cs
- DetailsViewAutoFormat.cs
- GregorianCalendar.cs
- SettingsContext.cs
- TcpActivation.cs
- BindableTemplateBuilder.cs
- DataControlImageButton.cs
- XmlAnyElementAttribute.cs
- StringKeyFrameCollection.cs
- ListViewTableRow.cs
- ObjectTag.cs
- ParameterToken.cs
- Walker.cs
- Line.cs
- RealizationContext.cs
- EntityDataSourceColumn.cs
- EmptyElement.cs
- InstancePersistenceEvent.cs
- XmlIlGenerator.cs
- PairComparer.cs
- Util.cs
- ClosableStream.cs
- ContextMarshalException.cs
- SpecularMaterial.cs
- QualifiedCellIdBoolean.cs
- XmlDownloadManager.cs
- ComponentDispatcherThread.cs
- FamilyMap.cs
- HttpCachePolicy.cs
- EntityRecordInfo.cs
- SystemDropShadowChrome.cs
- SqlCacheDependency.cs
- TextReader.cs
- BaseCollection.cs
- SharedPersonalizationStateInfo.cs
- ComponentEditorForm.cs
- QuestionEventArgs.cs
- PrinterUnitConvert.cs
- Identifier.cs