Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWeb / Server / System / Data / Services / Int32EqualityComparer.cs / 1 / Int32EqualityComparer.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Non-default-based implementation of IEqualityComparer<int>. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services { using System.Collections.Generic; ///This class implements IEqualityComparer for System.In32. ////// Using this class rather than EqualityComparer<T>.Default /// saves from JIT'ing it in each AppDomain. /// internal class Int32EqualityComparer : IEqualityComparer{ /// Empty constructor. internal Int32EqualityComparer() { } ///Checks whether two numbers are equal. /// First number.Second number. ///true if x equals y; false otherwise. public bool Equals(int x, int y) { return x == y; } ///Gets a hash code for the specified number. /// Value. ///The hash code for the specified value. public int GetHashCode(int obj) { return obj; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Non-default-based implementation of IEqualityComparer<int>. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services { using System.Collections.Generic; ///This class implements IEqualityComparer for System.In32. ////// Using this class rather than EqualityComparer<T>.Default /// saves from JIT'ing it in each AppDomain. /// internal class Int32EqualityComparer : IEqualityComparer{ /// Empty constructor. internal Int32EqualityComparer() { } ///Checks whether two numbers are equal. /// First number.Second number. ///true if x equals y; false otherwise. public bool Equals(int x, int y) { return x == y; } ///Gets a hash code for the specified number. /// Value. ///The hash code for the specified value. public int GetHashCode(int obj) { return obj; } } } // 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
- GridEntry.cs
- AuthorizationSection.cs
- TextProviderWrapper.cs
- MailWebEventProvider.cs
- AddInToken.cs
- Flattener.cs
- AnnotationMap.cs
- StreamSecurityUpgradeAcceptor.cs
- FormattedTextSymbols.cs
- InputBinding.cs
- sqlstateclientmanager.cs
- XpsFixedDocumentReaderWriter.cs
- ErrorProvider.cs
- FontNamesConverter.cs
- EntityChangedParams.cs
- FormViewInsertedEventArgs.cs
- XamlPathDataSerializer.cs
- DesignTimeType.cs
- FormsIdentity.cs
- BaseAppDomainProtocolHandler.cs
- TransformCryptoHandle.cs
- OneToOneMappingSerializer.cs
- NamespaceQuery.cs
- TimeSpanParse.cs
- BinaryWriter.cs
- IERequestCache.cs
- BinaryUtilClasses.cs
- ValidationError.cs
- JsonReaderDelegator.cs
- CapiSafeHandles.cs
- ServiceAuthorizationElement.cs
- TableStyle.cs
- StickyNoteHelper.cs
- TextParaLineResult.cs
- ImageListStreamer.cs
- StorageEndPropertyMapping.cs
- SupportsEventValidationAttribute.cs
- CommunicationObject.cs
- Knowncolors.cs
- SafeFileMappingHandle.cs
- SQLMembershipProvider.cs
- PrivilegedConfigurationManager.cs
- Models.cs
- ComponentDispatcherThread.cs
- ExpressionBindingCollection.cs
- UIElement3DAutomationPeer.cs
- AlternateViewCollection.cs
- WebServiceResponseDesigner.cs
- HttpWebResponse.cs
- HWStack.cs
- BitmapEffectGroup.cs
- Part.cs
- GroupBoxRenderer.cs
- COM2PictureConverter.cs
- SimpleMailWebEventProvider.cs
- UserMapPath.cs
- XmlDictionaryReaderQuotas.cs
- ApplicationGesture.cs
- GrammarBuilderWildcard.cs
- HitTestFilterBehavior.cs
- ToolstripProfessionalRenderer.cs
- PageTheme.cs
- SequenceRangeCollection.cs
- DataTable.cs
- SqlWebEventProvider.cs
- CookieParameter.cs
- XmlSchemaNotation.cs
- TaskScheduler.cs
- BinHexDecoder.cs
- DiagnosticsConfigurationHandler.cs
- FormViewDeleteEventArgs.cs
- CollectionViewProxy.cs
- ScriptRef.cs
- EmptyStringExpandableObjectConverter.cs
- PtsHost.cs
- StyleSheet.cs
- ObjectAnimationBase.cs
- TextElementAutomationPeer.cs
- UntrustedRecipientException.cs
- SqlDataSourceCommandEventArgs.cs
- PngBitmapEncoder.cs
- AvTrace.cs
- SQLChars.cs
- BinaryWriter.cs
- ContainerSelectorBehavior.cs
- Rect3D.cs
- XamlReaderHelper.cs
- ProxyAttribute.cs
- HttpBindingExtension.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- ReachDocumentPageSerializerAsync.cs
- EmptyControlCollection.cs
- ListViewContainer.cs
- Membership.cs
- DynamicQueryableWrapper.cs
- ProviderConnectionPoint.cs
- PointConverter.cs
- FlowDocumentPaginator.cs
- XsdDateTime.cs
- EditorZone.cs