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
- DataGridViewCellEventArgs.cs
- Scripts.cs
- _ProxyChain.cs
- StateDesigner.Layouts.cs
- XmlWhitespace.cs
- util.cs
- Types.cs
- HashSetDebugView.cs
- PointAnimationUsingPath.cs
- Span.cs
- DefaultPropertyAttribute.cs
- PersonalizationStateQuery.cs
- QilGenerator.cs
- Constraint.cs
- MergablePropertyAttribute.cs
- SystemIPv6InterfaceProperties.cs
- ObjectSecurity.cs
- SQLRoleProvider.cs
- AspCompat.cs
- PropertyChangingEventArgs.cs
- RijndaelManagedTransform.cs
- MultiplexingDispatchMessageFormatter.cs
- ClientScriptItemCollection.cs
- CircleHotSpot.cs
- SourceChangedEventArgs.cs
- SafeHandles.cs
- PageFunction.cs
- SqlInternalConnection.cs
- GridViewUpdateEventArgs.cs
- BaseConfigurationRecord.cs
- DmlSqlGenerator.cs
- SelectionChangedEventArgs.cs
- WMIInterop.cs
- TextParaClient.cs
- PenCursorManager.cs
- NotifyIcon.cs
- DesignerObjectListAdapter.cs
- ErrorWrapper.cs
- BaseValidator.cs
- SaveFileDialog.cs
- ProgressBar.cs
- WindowsTreeView.cs
- ContractsBCL.cs
- CompModSwitches.cs
- OutputWindow.cs
- DataGridViewCellValueEventArgs.cs
- IDictionary.cs
- FusionWrap.cs
- HotCommands.cs
- Matrix3DValueSerializer.cs
- ExpressionVisitorHelpers.cs
- HtmlContainerControl.cs
- Vector3DKeyFrameCollection.cs
- DataGridViewCellStyleConverter.cs
- ResXResourceSet.cs
- ImageCodecInfo.cs
- ReferencedCollectionType.cs
- UiaCoreTypesApi.cs
- GridView.cs
- WindowsButton.cs
- LineSegment.cs
- TraceSection.cs
- SessionStateUtil.cs
- ProviderCollection.cs
- Metafile.cs
- TimeSpanValidatorAttribute.cs
- SecurityPermission.cs
- CodeBlockBuilder.cs
- ServiceNotStartedException.cs
- ValidatingPropertiesEventArgs.cs
- ApplicationSettingsBase.cs
- EventHandlerList.cs
- TreeNodeStyle.cs
- TextDecorationCollection.cs
- DataGridViewDataConnection.cs
- XmlSerializerAssemblyAttribute.cs
- HostingEnvironment.cs
- SecurityTokenRequirement.cs
- WebConfigurationManager.cs
- OperationResponse.cs
- _TLSstream.cs
- StateChangeEvent.cs
- CachedTypeface.cs
- DbProviderSpecificTypePropertyAttribute.cs
- CodeAttributeArgument.cs
- SessionEndedEventArgs.cs
- InputScope.cs
- WebPartZoneBase.cs
- TimeSpanConverter.cs
- TypeDescriptorContext.cs
- smtpconnection.cs
- XmlSchemaSet.cs
- XmlAutoDetectWriter.cs
- PersianCalendar.cs
- WpfGeneratedKnownProperties.cs
- HitTestResult.cs
- MsmqIntegrationProcessProtocolHandler.cs
- DataFormat.cs
- CompoundFileStorageReference.cs
- SimpleFieldTemplateUserControl.cs