Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / TypeConverterAttribute.cs / 1 / TypeConverterAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System.Diagnostics; using System.Globalization; using System.Runtime.Serialization.Formatters; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class TypeConverterAttribute : Attribute { private string typeName; ///Specifies what type to use as /// a converter for the object /// this /// attribute is bound to. This class cannot /// be inherited. ////// public static readonly TypeConverterAttribute Default = new TypeConverterAttribute(); ///Specifies the type to use as /// a converter for the object this attribute is bound to. This /// ///field is read-only. /// public TypeConverterAttribute() { this.typeName = string.Empty; } ////// Initializes a new instance of the ///class with the /// default type converter, which /// is an /// empty string (""). /// /// public TypeConverterAttribute(Type type) { this.typeName = type.AssemblyQualifiedName; } ///Initializes a new instance of the ///class, using /// the specified type as the data converter for the object this attribute /// is bound /// to. /// public TypeConverterAttribute(string typeName) { string temp = typeName.ToUpper(CultureInfo.InvariantCulture); Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + typeName + " . Please remove the .dll extension"); this.typeName = typeName; } ///Initializes a new instance of the ///class, using /// the specified type name as the data converter for the object this attribute is bound to. /// public string ConverterTypeName { get { return typeName; } } public override bool Equals(object obj) { TypeConverterAttribute other = obj as TypeConverterAttribute; return (other != null) && other.ConverterTypeName == typeName; } public override int GetHashCode() { return typeName.GetHashCode(); } } }Gets the fully qualified type name of the ////// to use as a converter for the object this attribute /// is bound to.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IntegerFacetDescriptionElement.cs
- ScrollChrome.cs
- InfoCardProofToken.cs
- ELinqQueryState.cs
- ObjectView.cs
- SafeArrayTypeMismatchException.cs
- CollectionViewProxy.cs
- InternalConfigHost.cs
- IRCollection.cs
- BinaryReader.cs
- NavigationPropertyEmitter.cs
- RepeatButton.cs
- Byte.cs
- ToolStripItemImageRenderEventArgs.cs
- ByteFacetDescriptionElement.cs
- WindowsFormsDesignerOptionService.cs
- Point4D.cs
- Roles.cs
- DefinitionBase.cs
- XmlAtomicValue.cs
- _NegoState.cs
- BitmapEffectDrawingContextWalker.cs
- OuterGlowBitmapEffect.cs
- InternalControlCollection.cs
- Matrix3D.cs
- _SafeNetHandles.cs
- ExceptionTranslationTable.cs
- BookmarkEventArgs.cs
- GuidTagList.cs
- SelectedGridItemChangedEvent.cs
- SafeNativeMethods.cs
- ThreadInterruptedException.cs
- ObjectDataSourceChooseTypePanel.cs
- EventDescriptor.cs
- TypefaceMetricsCache.cs
- TextRangeEdit.cs
- DataObjectAttribute.cs
- PenCursorManager.cs
- PublisherMembershipCondition.cs
- FontInfo.cs
- WebPartsSection.cs
- WebControlAdapter.cs
- OleDbPermission.cs
- EdgeProfileValidation.cs
- ScrollItemPattern.cs
- KeyConstraint.cs
- ScriptDescriptor.cs
- SqlNotificationRequest.cs
- CodeFieldReferenceExpression.cs
- IndexerNameAttribute.cs
- Transform.cs
- OptimalBreakSession.cs
- InputScopeConverter.cs
- SizeConverter.cs
- CacheMemory.cs
- WindowsEditBoxRange.cs
- FontSourceCollection.cs
- PerfCounterSection.cs
- OutputCacheProfile.cs
- AnnotationResourceChangedEventArgs.cs
- ApplicationActivator.cs
- Style.cs
- VisualCollection.cs
- Number.cs
- ServiceOperationParameter.cs
- FilterException.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- DataGridViewCheckBoxCell.cs
- GeneralTransform3DGroup.cs
- GenericEnumConverter.cs
- ReliableMessagingVersionConverter.cs
- X509Chain.cs
- PriorityBinding.cs
- TextTreeText.cs
- CommandBinding.cs
- TypeConverterAttribute.cs
- RowUpdatedEventArgs.cs
- ManipulationStartingEventArgs.cs
- ListViewItemEventArgs.cs
- CatalogZone.cs
- InvalidEnumArgumentException.cs
- DatagridviewDisplayedBandsData.cs
- ConnectionStringsExpressionBuilder.cs
- VerticalAlignConverter.cs
- SortedDictionary.cs
- DefaultBindingPropertyAttribute.cs
- CallSite.cs
- TypefaceMetricsCache.cs
- GatewayDefinition.cs
- ProcessStartInfo.cs
- DynamicUpdateCommand.cs
- PersonalizationProviderHelper.cs
- CmsInterop.cs
- SqlNotificationRequest.cs
- CollectionViewGroupInternal.cs
- StorageComplexTypeMapping.cs
- ToolStripContentPanelRenderEventArgs.cs
- Roles.cs
- GridViewRowEventArgs.cs
- GeneralTransform3DGroup.cs