Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / Utils / ReverseComparer.cs / 1305376 / ReverseComparer.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // ReverseComparer.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; namespace System.Linq.Parallel { ////// Comparer that wraps another comparer, and flips the result of each comparison to the /// opposite answer. /// ///internal class ReverseComparer : IComparer { private IComparer m_comparer; internal ReverseComparer(IComparer comparer) { m_comparer = comparer; } public int Compare(T x, T y) { return -m_comparer.Compare(x, y); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // ReverseComparer.cs // // [....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; namespace System.Linq.Parallel { ////// Comparer that wraps another comparer, and flips the result of each comparison to the /// opposite answer. /// ///internal class ReverseComparer : IComparer { private IComparer m_comparer; internal ReverseComparer(IComparer comparer) { m_comparer = comparer; } public int Compare(T x, T y) { return -m_comparer.Compare(x, y); } } } // 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
- ListBindingConverter.cs
- ConfigurationLocationCollection.cs
- KeyFrames.cs
- TextEditorCharacters.cs
- MessageDecoder.cs
- newinstructionaction.cs
- ContentOperations.cs
- BinaryFormatterWriter.cs
- IsolatedStoragePermission.cs
- GAC.cs
- DSASignatureFormatter.cs
- ExpressionEditor.cs
- TextLine.cs
- InvalidComObjectException.cs
- ObjectDataSourceWizardForm.cs
- SqlDependencyListener.cs
- DbParameterCollectionHelper.cs
- SimpleMailWebEventProvider.cs
- Compiler.cs
- RegexRunner.cs
- XhtmlBasicCommandAdapter.cs
- CheckBoxBaseAdapter.cs
- ByteConverter.cs
- TextRangeSerialization.cs
- BeginGetFileNameFromUserRequest.cs
- _FtpDataStream.cs
- SqlFacetAttribute.cs
- Speller.cs
- StateInitialization.cs
- PeerToPeerException.cs
- BrowserInteropHelper.cs
- RtfControlWordInfo.cs
- UInt16.cs
- ExitEventArgs.cs
- ResourceCodeDomSerializer.cs
- NativeRecognizer.cs
- PackageFilter.cs
- MenuItem.cs
- XmlCharType.cs
- SamlDoNotCacheCondition.cs
- EmptyImpersonationContext.cs
- DataPointer.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- OutputCacheSettings.cs
- XhtmlBasicTextBoxAdapter.cs
- RowParagraph.cs
- COM2FontConverter.cs
- Authorization.cs
- EditorAttribute.cs
- QilXmlReader.cs
- AssertFilter.cs
- DiscreteKeyFrames.cs
- WindowsListBox.cs
- WebMessageBodyStyleHelper.cs
- FormDesigner.cs
- PageCatalogPart.cs
- DtrList.cs
- FieldDescriptor.cs
- ConditionCollection.cs
- DirectoryInfo.cs
- DesignTimeParseData.cs
- _NestedSingleAsyncResult.cs
- GroupBoxRenderer.cs
- EmbeddedMailObject.cs
- Stack.cs
- OrderedDictionary.cs
- xml.cs
- MachineKeySection.cs
- ReadOnlyDictionary.cs
- XslAstAnalyzer.cs
- HttpCachePolicy.cs
- _CacheStreams.cs
- EndPoint.cs
- DataControlButton.cs
- EntityDataSourceDesignerHelper.cs
- BaseComponentEditor.cs
- FragmentNavigationEventArgs.cs
- IItemContainerGenerator.cs
- BevelBitmapEffect.cs
- CompoundFileStorageReference.cs
- ValueQuery.cs
- ValidationSummary.cs
- RSACryptoServiceProvider.cs
- xdrvalidator.cs
- Panel.cs
- DataProtection.cs
- DependencyPropertyValueSerializer.cs
- WebBaseEventKeyComparer.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- XmlSerializationReader.cs
- DataServiceCollectionOfT.cs
- UnmanagedMarshal.cs
- MouseCaptureWithinProperty.cs
- XmlNodeWriter.cs
- RoleService.cs
- EDesignUtil.cs
- WebPartDesigner.cs
- DictionaryManager.cs
- BaseCodePageEncoding.cs
- AuthenticationServiceManager.cs