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
- DropSource.cs
- SafeTimerHandle.cs
- VisualTreeHelper.cs
- DynamicPropertyReader.cs
- DesignerAdapterUtil.cs
- EventTrigger.cs
- ColorAnimation.cs
- Assert.cs
- ObjectHelper.cs
- RenameRuleObjectDialog.Designer.cs
- Bezier.cs
- ModuleBuilder.cs
- ProxyWebPart.cs
- VersionUtil.cs
- UidManager.cs
- CallSiteBinder.cs
- MetadataUtilsSmi.cs
- SessionPageStatePersister.cs
- LogicalExpressionTypeConverter.cs
- MaskInputRejectedEventArgs.cs
- DomainUpDown.cs
- RawContentTypeMapper.cs
- StreamReader.cs
- WCFModelStrings.Designer.cs
- DbConnectionFactory.cs
- AnnotationResourceChangedEventArgs.cs
- HelpHtmlBuilder.cs
- DurationConverter.cs
- ThicknessAnimationUsingKeyFrames.cs
- Debug.cs
- GroupBox.cs
- PopupEventArgs.cs
- StringComparer.cs
- CodeThrowExceptionStatement.cs
- HandleCollector.cs
- CancellationTokenRegistration.cs
- TableLayoutPanelCodeDomSerializer.cs
- ToolboxItemWrapper.cs
- SubpageParagraph.cs
- SchemaEntity.cs
- FilteredSchemaElementLookUpTable.cs
- LinqDataSourceUpdateEventArgs.cs
- Int64AnimationBase.cs
- NamedPermissionSet.cs
- TcpStreams.cs
- ArgumentNullException.cs
- ClientRuntimeConfig.cs
- ControlPaint.cs
- Rectangle.cs
- XmlParserContext.cs
- OdbcDataReader.cs
- ControlValuePropertyAttribute.cs
- CategoriesDocument.cs
- HtmlString.cs
- BitmapCache.cs
- DataGridViewRowStateChangedEventArgs.cs
- DispatcherHookEventArgs.cs
- FtpCachePolicyElement.cs
- DBSqlParser.cs
- PriorityBinding.cs
- HtmlTableRowCollection.cs
- SplitterPanel.cs
- UrlMappingsSection.cs
- DefaultSerializationProviderAttribute.cs
- RTLAwareMessageBox.cs
- ChildrenQuery.cs
- DataControlFieldCell.cs
- DataGridViewCheckBoxCell.cs
- XmlCodeExporter.cs
- CheckedPointers.cs
- KeyFrames.cs
- GridViewCellAutomationPeer.cs
- Stroke2.cs
- DoubleLink.cs
- IResourceProvider.cs
- DebugController.cs
- NamespaceInfo.cs
- FilterException.cs
- TypeDescriptionProviderAttribute.cs
- MemoryPressure.cs
- BuildResultCache.cs
- ParallelQuery.cs
- PopupEventArgs.cs
- CollectionView.cs
- CodeLinePragma.cs
- StatusStrip.cs
- InputLangChangeEvent.cs
- panel.cs
- DataFormats.cs
- CqlErrorHelper.cs
- TypedDatasetGenerator.cs
- ControlBuilder.cs
- FileVersion.cs
- EnumBuilder.cs
- CustomWebEventKey.cs
- RectangleHotSpot.cs
- RandomNumberGenerator.cs
- CheckBoxAutomationPeer.cs
- DetailsViewModeEventArgs.cs
- Persist.cs