Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Services / Monitoring / system / Diagnosticts / AlphabeticalEnumConverter.cs / 1 / AlphabeticalEnumConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Diagnostics { using System.Collections; using System.ComponentModel; using System; using System.Globalization; ////// /// internal class AlphabeticalEnumConverter : EnumConverter { public AlphabeticalEnumConverter(Type type) : base(type) { } public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { if (Values == null) { Array objValues = Enum.GetValues(EnumType); //IComparer comparer = Comparer; object[] names = new object[objValues.Length]; for (int i = 0; i < names.Length; i++) names[i] = ConvertTo(context, null, objValues.GetValue(i), typeof(string)); Array.Sort(names, objValues, 0, objValues.Length, System.Collections.Comparer.Default); Values = new StandardValuesCollection(objValues); } return Values; } } }/// Provides a type converter to /// convert ???? objects to and from various other representations. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DocumentOrderQuery.cs
- Listbox.cs
- ProviderSettingsCollection.cs
- ThreadSafeList.cs
- streamingZipPartStream.cs
- ZoneLinkButton.cs
- ValidationEventArgs.cs
- NewExpression.cs
- TextRange.cs
- AbsoluteQuery.cs
- DragDeltaEventArgs.cs
- PersonalizationStateInfoCollection.cs
- StringToken.cs
- MachinePropertyVariants.cs
- TrackingAnnotationCollection.cs
- ToolboxBitmapAttribute.cs
- StreamAsIStream.cs
- CallbackHandler.cs
- TransformGroup.cs
- SqlCommandAsyncResult.cs
- ViewEvent.cs
- latinshape.cs
- OrderPreservingMergeHelper.cs
- PropertyGeneratedEventArgs.cs
- TokenBasedSetEnumerator.cs
- CodeMemberMethod.cs
- GridView.cs
- StaticExtension.cs
- JsonSerializer.cs
- HebrewCalendar.cs
- RewritingValidator.cs
- EntityDataSourceChangingEventArgs.cs
- SystemEvents.cs
- ParameterToken.cs
- HttpProfileGroupBase.cs
- Configuration.cs
- GraphicsPath.cs
- Accessible.cs
- SoapDocumentServiceAttribute.cs
- TextTreeTextElementNode.cs
- IList.cs
- XPathCompileException.cs
- MutexSecurity.cs
- MatcherBuilder.cs
- PassportIdentity.cs
- VersionedStream.cs
- InfoCardClaim.cs
- NamespaceListProperty.cs
- WindowsFont.cs
- MessageQueueInstaller.cs
- PathHelper.cs
- RawStylusSystemGestureInputReport.cs
- ServiceHandle.cs
- ByteStream.cs
- DSACryptoServiceProvider.cs
- DLinqDataModelProvider.cs
- ContentIterators.cs
- TextTreeRootNode.cs
- CancellationScope.cs
- CodeAssignStatement.cs
- MinMaxParagraphWidth.cs
- SubpageParagraph.cs
- AdRotator.cs
- OleDbConnection.cs
- NumberSubstitution.cs
- DbConnectionPoolCounters.cs
- XmlSchemaDatatype.cs
- JsonByteArrayDataContract.cs
- LayoutSettings.cs
- ConfigurationException.cs
- CookielessHelper.cs
- XmlSchemaAttribute.cs
- MouseGestureValueSerializer.cs
- NavigationFailedEventArgs.cs
- RadioButton.cs
- RequestNavigateEventArgs.cs
- RowUpdatedEventArgs.cs
- ColumnMap.cs
- EncodingInfo.cs
- XmlDocumentSchema.cs
- ZoneIdentityPermission.cs
- ConfigXmlWhitespace.cs
- FormatException.cs
- ModelPropertyImpl.cs
- WebZone.cs
- ZipIOModeEnforcingStream.cs
- CodeCompileUnit.cs
- DesignerAttribute.cs
- FilePrompt.cs
- LinkUtilities.cs
- MSG.cs
- SymbolEqualComparer.cs
- QuadraticEase.cs
- FocusChangedEventArgs.cs
- AbstractDataSvcMapFileLoader.cs
- NodeInfo.cs
- AuthStoreRoleProvider.cs
- Avt.cs
- EdmComplexTypeAttribute.cs
- XmlNodeList.cs