Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / AlphabeticalEnumConverter.cs / 1305376 / 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; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// 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
- CommandDevice.cs
- _ShellExpression.cs
- BCLDebug.cs
- Accessible.cs
- GroupBox.cs
- ThemeDirectoryCompiler.cs
- DescriptionAttribute.cs
- MetadataArtifactLoaderResource.cs
- ImageListImageEditor.cs
- SqlClientWrapperSmiStreamChars.cs
- Documentation.cs
- coordinator.cs
- ArrayHelper.cs
- StatusBarPanel.cs
- WorkflowExecutor.cs
- FacetValueContainer.cs
- OutputCacheSettings.cs
- MediaTimeline.cs
- bidPrivateBase.cs
- ISO2022Encoding.cs
- MediaContext.cs
- XmlSchemaFacet.cs
- ListSourceHelper.cs
- HttpSessionStateWrapper.cs
- BitArray.cs
- TextProperties.cs
- DependentList.cs
- HtmlTable.cs
- HttpPostedFileBase.cs
- ResXResourceWriter.cs
- MemoryMappedViewStream.cs
- AppDomainManager.cs
- XPathSelfQuery.cs
- Camera.cs
- ClientBuildManager.cs
- FontFamily.cs
- HtmlInputControl.cs
- ToolStripItemTextRenderEventArgs.cs
- DataGridViewTextBoxCell.cs
- ColorMatrix.cs
- ColorBlend.cs
- DependencyObjectProvider.cs
- HandleCollector.cs
- PassportIdentity.cs
- ServiceBusyException.cs
- PerformanceCounterLib.cs
- DynamicDocumentPaginator.cs
- Stylus.cs
- HttpListenerTimeoutManager.cs
- MessageSmuggler.cs
- NamedServiceModelExtensionCollectionElement.cs
- IsolatedStorageFileStream.cs
- RoutingEndpointTrait.cs
- PeerUnsafeNativeCryptMethods.cs
- ToolStripHighContrastRenderer.cs
- AssociatedControlConverter.cs
- PathGeometry.cs
- RNGCryptoServiceProvider.cs
- RTLAwareMessageBox.cs
- TabPage.cs
- IdentityManager.cs
- XmlHierarchicalEnumerable.cs
- DefaultPropertyAttribute.cs
- HtmlEmptyTagControlBuilder.cs
- EncryptedReference.cs
- ListChangedEventArgs.cs
- DesigntimeLicenseContextSerializer.cs
- SelectionPattern.cs
- PageParserFilter.cs
- DrawingContextWalker.cs
- BaseParagraph.cs
- IInstanceTable.cs
- SplineKeyFrames.cs
- IntegerValidatorAttribute.cs
- WebPartZoneBase.cs
- DataBindingList.cs
- LogSwitch.cs
- ExpressionBuilder.cs
- ViewPort3D.cs
- CmsInterop.cs
- WpfKnownType.cs
- BasicExpressionVisitor.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ListViewInsertEventArgs.cs
- sqlmetadatafactory.cs
- PreviewPrintController.cs
- TemplateField.cs
- HijriCalendar.cs
- HasCopySemanticsAttribute.cs
- CellParaClient.cs
- CanonicalizationDriver.cs
- XamlWrapperReaders.cs
- DataFormats.cs
- TextBoxAutomationPeer.cs
- ProcessStartInfo.cs
- Encoding.cs
- BindingNavigator.cs
- QueryOutputWriter.cs
- QuotedStringFormatReader.cs
- DPCustomTypeDescriptor.cs