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
- QilTypeChecker.cs
- Mutex.cs
- SecurityResources.cs
- ParallelQuery.cs
- GiveFeedbackEventArgs.cs
- InheritanceRules.cs
- Signature.cs
- SqlProfileProvider.cs
- Button.cs
- GenerateHelper.cs
- DataGridAutomationPeer.cs
- TextChange.cs
- PeerCredential.cs
- VisualTreeHelper.cs
- AssemblyInfo.cs
- Cell.cs
- Rect3DConverter.cs
- HyperLinkDesigner.cs
- NativeRightsManagementAPIsStructures.cs
- DesignerContextDescriptor.cs
- StoragePropertyMapping.cs
- ProfilePropertySettingsCollection.cs
- PopOutPanel.cs
- EventDescriptor.cs
- SerializationInfoEnumerator.cs
- DeviceContexts.cs
- XmlDataSourceNodeDescriptor.cs
- TextSearch.cs
- DataProviderNameConverter.cs
- DataGridItem.cs
- EventRoute.cs
- DrawingCollection.cs
- UshortList2.cs
- PerformanceCounterLib.cs
- TraceXPathNavigator.cs
- RectKeyFrameCollection.cs
- MultiTrigger.cs
- ReflectionUtil.cs
- SafeThreadHandle.cs
- Directory.cs
- WebConfigurationHost.cs
- DataGridViewComboBoxCell.cs
- VScrollProperties.cs
- METAHEADER.cs
- BaseParaClient.cs
- ReferentialConstraint.cs
- CharUnicodeInfo.cs
- xml.cs
- MethodCallConverter.cs
- HttpProtocolReflector.cs
- ArrayTypeMismatchException.cs
- TreeViewHitTestInfo.cs
- SiteMapHierarchicalDataSourceView.cs
- DecoderExceptionFallback.cs
- Bits.cs
- UnsafePeerToPeerMethods.cs
- Action.cs
- DetailsViewDeletedEventArgs.cs
- CmsInterop.cs
- TrustLevel.cs
- HtmlButton.cs
- BaseResourcesBuildProvider.cs
- RequestTimeoutManager.cs
- Point.cs
- DocumentGridPage.cs
- EndpointInstanceProvider.cs
- QueryResultOp.cs
- Camera.cs
- Documentation.cs
- OperationAbortedException.cs
- ToolStripComboBox.cs
- FunctionMappingTranslator.cs
- DataTable.cs
- ChtmlLinkAdapter.cs
- ScrollableControl.cs
- WorkflowDesignerColors.cs
- __Error.cs
- WindowHideOrCloseTracker.cs
- HtmlFormWrapper.cs
- PropertyEmitter.cs
- NumericUpDownAcceleration.cs
- PageVisual.cs
- XmlSchemaImport.cs
- BindingValueChangedEventArgs.cs
- EditingScope.cs
- SimpleWebHandlerParser.cs
- RegexReplacement.cs
- TextRunCacheImp.cs
- OrderPreservingPipeliningSpoolingTask.cs
- JournalNavigationScope.cs
- HttpCacheVaryByContentEncodings.cs
- InitializerFacet.cs
- FilterElement.cs
- OdbcUtils.cs
- LinkedDataMemberFieldEditor.cs
- PeerNameRecord.cs
- XMLSyntaxException.cs
- CommonXSendMessage.cs
- WSHttpBinding.cs
- WeakRefEnumerator.cs