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
- DoubleSumAggregationOperator.cs
- BamlLocalizableResource.cs
- Propagator.Evaluator.cs
- AutoCompleteStringCollection.cs
- TypedTableHandler.cs
- SystemIPInterfaceProperties.cs
- WinEventHandler.cs
- ContainerAction.cs
- PKCS1MaskGenerationMethod.cs
- TimeSpanMinutesConverter.cs
- LastQueryOperator.cs
- PropertyPath.cs
- SQLDecimal.cs
- HttpMethodAttribute.cs
- RealProxy.cs
- WorkflowTimerService.cs
- LinkUtilities.cs
- CannotUnloadAppDomainException.cs
- DependencyPropertyKind.cs
- DataGridHeaderBorder.cs
- DecoderReplacementFallback.cs
- __Filters.cs
- PeerName.cs
- FrameworkTemplate.cs
- TdsParserStateObject.cs
- MailDefinition.cs
- TCEAdapterGenerator.cs
- TemplatedMailWebEventProvider.cs
- DataGridColumnStyleMappingNameEditor.cs
- TableCell.cs
- XsltOutput.cs
- SqlDataSourceStatusEventArgs.cs
- Metadata.cs
- CngKeyBlobFormat.cs
- LocationSectionRecord.cs
- coordinatorscratchpad.cs
- UnauthorizedWebPart.cs
- ServiceDescriptionData.cs
- Slider.cs
- ZoneIdentityPermission.cs
- ClientData.cs
- HttpServerChannel.cs
- ConstructorBuilder.cs
- HttpHandlersSection.cs
- FormParameter.cs
- RemotingSurrogateSelector.cs
- DateBoldEvent.cs
- SubMenuStyle.cs
- ACE.cs
- InvalidCommandTreeException.cs
- ScrollItemProviderWrapper.cs
- EpmHelper.cs
- MarshalByValueComponent.cs
- CellTreeNodeVisitors.cs
- VectorAnimationUsingKeyFrames.cs
- ValidatingPropertiesEventArgs.cs
- AmbientLight.cs
- AlgoModule.cs
- SqlDataReader.cs
- AdvancedBindingPropertyDescriptor.cs
- SqlConnectionStringBuilder.cs
- ComAdminInterfaces.cs
- PlaceHolder.cs
- IPPacketInformation.cs
- entityreference_tresulttype.cs
- GridItemPatternIdentifiers.cs
- ConnectionStringsExpressionBuilder.cs
- NamespaceInfo.cs
- HGlobalSafeHandle.cs
- MaskPropertyEditor.cs
- StateDesigner.Helpers.cs
- UndoManager.cs
- TemplateKey.cs
- TemplateManager.cs
- Context.cs
- Material.cs
- ContentControl.cs
- TabletDeviceInfo.cs
- BasicCellRelation.cs
- UidPropertyAttribute.cs
- TargetException.cs
- ResourceBinder.cs
- WebServicesDescriptionAttribute.cs
- XMLUtil.cs
- NotificationContext.cs
- FormsAuthenticationUserCollection.cs
- ComAdminInterfaces.cs
- _AutoWebProxyScriptHelper.cs
- ScaleTransform.cs
- MethodBuilderInstantiation.cs
- QilExpression.cs
- Journal.cs
- HGlobalSafeHandle.cs
- TimeSpanConverter.cs
- DesignerVerbCollection.cs
- ActiveXHelper.cs
- UIPermission.cs
- RelationshipNavigation.cs
- AuthenticationServiceManager.cs
- SqlStream.cs