Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Misc / InvariantComparer.cs / 1 / InvariantComparer.cs
namespace System { using System; using System.Collections; using System.Globalization; [Serializable] internal class InvariantComparer : IComparer { private CompareInfo m_compareInfo; internal static readonly InvariantComparer Default = new InvariantComparer(); internal InvariantComparer() { m_compareInfo = CultureInfo.InvariantCulture.CompareInfo; } public int Compare(Object a, Object b) { String sa = a as String; String sb = b as String; if (sa != null && sb != null) return m_compareInfo.Compare(sa, sb); else return Comparer.Default.Compare(a,b); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System { using System; using System.Collections; using System.Globalization; [Serializable] internal class InvariantComparer : IComparer { private CompareInfo m_compareInfo; internal static readonly InvariantComparer Default = new InvariantComparer(); internal InvariantComparer() { m_compareInfo = CultureInfo.InvariantCulture.CompareInfo; } public int Compare(Object a, Object b) { String sa = a as String; String sb = b as String; if (sa != null && sb != null) return m_compareInfo.Compare(sa, sb); else return Comparer.Default.Compare(a,b); } } } // 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
- TextFormatterContext.cs
- EntityContainerAssociationSet.cs
- GroupQuery.cs
- ByteStorage.cs
- CodeNamespaceCollection.cs
- TypeConverterHelper.cs
- HashHelper.cs
- QueryStatement.cs
- ZoneIdentityPermission.cs
- XmlSortKey.cs
- parserscommon.cs
- StylusPointPropertyInfoDefaults.cs
- XmlSchema.cs
- EventDriven.cs
- ZoneIdentityPermission.cs
- SRGSCompiler.cs
- WindowCollection.cs
- ClientSideProviderDescription.cs
- ShimAsPublicXamlType.cs
- XmlIterators.cs
- Rule.cs
- WebReferencesBuildProvider.cs
- XamlFigureLengthSerializer.cs
- ContractInferenceHelper.cs
- ImageMetadata.cs
- DataPagerFieldCommandEventArgs.cs
- WebControl.cs
- FileUtil.cs
- AccessedThroughPropertyAttribute.cs
- XPathNavigatorKeyComparer.cs
- ArraySet.cs
- RectAnimationBase.cs
- PropertyPathWorker.cs
- MdImport.cs
- DirectoryObjectSecurity.cs
- EmptyCollection.cs
- WpfXamlMember.cs
- XamlStream.cs
- FormsAuthenticationCredentials.cs
- LoadWorkflowByKeyAsyncResult.cs
- StructureChangedEventArgs.cs
- MenuItemStyleCollection.cs
- IProvider.cs
- XamlUtilities.cs
- TextEffect.cs
- RecordsAffectedEventArgs.cs
- ItemContainerGenerator.cs
- BaseCodeDomTreeGenerator.cs
- DataGridViewHeaderCell.cs
- MethodExecutor.cs
- SecurityDescriptor.cs
- CounterCreationData.cs
- PageSettings.cs
- PhysicalAddress.cs
- ReaderContextStackData.cs
- StorageConditionPropertyMapping.cs
- FileDialog_Vista.cs
- WindowsPen.cs
- FreeFormDesigner.cs
- CultureNotFoundException.cs
- PropertyChangeTracker.cs
- RC2.cs
- MultiByteCodec.cs
- PageSetupDialog.cs
- TypeUsage.cs
- ViewManager.cs
- NonClientArea.cs
- DragStartedEventArgs.cs
- entitydatasourceentitysetnameconverter.cs
- ChannelParameterCollection.cs
- WpfGeneratedKnownProperties.cs
- WorkerRequest.cs
- DocumentXmlWriter.cs
- LogExtentCollection.cs
- SqlServices.cs
- RegexReplacement.cs
- securitycriticaldata.cs
- MetadataCache.cs
- SecurityContext.cs
- BookmarkList.cs
- ListViewItemSelectionChangedEvent.cs
- Geometry3D.cs
- LiteralControl.cs
- BitmapEffectGroup.cs
- NamespaceExpr.cs
- SequentialOutput.cs
- CodeGenHelper.cs
- CommandLibraryHelper.cs
- TransformerInfoCollection.cs
- TextBoxView.cs
- DetailsViewDeleteEventArgs.cs
- StaticContext.cs
- ClientProxyGenerator.cs
- IdentifierService.cs
- ExtenderHelpers.cs
- UnhandledExceptionEventArgs.cs
- RelatedEnd.cs
- Merger.cs
- DataTableCollection.cs
- BitmapMetadataEnumerator.cs