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
![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
- SystemIPGlobalProperties.cs
- DependencyObjectPropertyDescriptor.cs
- TreeNodeBinding.cs
- ConfigurationManager.cs
- ConfigsHelper.cs
- ResourceContainer.cs
- ImmutableObjectAttribute.cs
- OleDbSchemaGuid.cs
- NativeMethods.cs
- ScrollBarAutomationPeer.cs
- WebPartConnectionsCloseVerb.cs
- ControlCachePolicy.cs
- DesignerObject.cs
- CommonObjectSecurity.cs
- CqlLexerHelpers.cs
- TriState.cs
- BamlBinaryReader.cs
- MailDefinition.cs
- Oid.cs
- PasswordBoxAutomationPeer.cs
- Control.cs
- InheritablePropertyChangeInfo.cs
- FormViewModeEventArgs.cs
- Misc.cs
- RelOps.cs
- CodeActivity.cs
- DataGridParentRows.cs
- ConsumerConnectionPoint.cs
- DPAPIProtectedConfigurationProvider.cs
- BindUriHelper.cs
- OleDbWrapper.cs
- altserialization.cs
- CompoundFileStorageReference.cs
- DataServiceCollectionOfT.cs
- TimelineCollection.cs
- ExplicitDiscriminatorMap.cs
- SoapMessage.cs
- ContentControl.cs
- ExtensionSimplifierMarkupObject.cs
- GPRECT.cs
- LateBoundBitmapDecoder.cs
- UrlMappingsModule.cs
- ServerProtocol.cs
- CodeCommentStatement.cs
- SingleStorage.cs
- TextFormatterContext.cs
- GenericWebPart.cs
- ApplicationInfo.cs
- ProcessModelInfo.cs
- ResourceExpressionEditor.cs
- WinCategoryAttribute.cs
- CacheOutputQuery.cs
- XmlSerializerAssemblyAttribute.cs
- KeySplineConverter.cs
- SetterBase.cs
- PrincipalPermission.cs
- CompilerTypeWithParams.cs
- ConnectionProviderAttribute.cs
- Operator.cs
- UnmanagedMemoryStreamWrapper.cs
- SuppressMergeCheckAttribute.cs
- UIElement.cs
- CodeDefaultValueExpression.cs
- InternalTransaction.cs
- WebServiceResponse.cs
- DateTimeUtil.cs
- FixedSOMImage.cs
- XmlSchemaExternal.cs
- SqlRowUpdatingEvent.cs
- IntegerValidator.cs
- RequestFactory.cs
- DispatcherSynchronizationContext.cs
- DocumentApplicationState.cs
- PKCS1MaskGenerationMethod.cs
- SqlProviderManifest.cs
- TextEditorTyping.cs
- ComponentDispatcherThread.cs
- Int16KeyFrameCollection.cs
- ConfigXmlAttribute.cs
- CategoryGridEntry.cs
- PartialCachingAttribute.cs
- Axis.cs
- Empty.cs
- DashStyle.cs
- EntityContainerEmitter.cs
- ProjectionRewriter.cs
- SelectedDatesCollection.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- BooleanAnimationBase.cs
- SqlParameter.cs
- ResourcePermissionBaseEntry.cs
- printdlgexmarshaler.cs
- SqlColumnizer.cs
- SByteConverter.cs
- ConsumerConnectionPoint.cs
- LicenseException.cs
- Expressions.cs
- PageCatalogPart.cs
- MessageTraceRecord.cs
- DataTablePropertyDescriptor.cs