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
- PostBackOptions.cs
- SoundPlayerAction.cs
- TrackBar.cs
- HyperLinkDesigner.cs
- CompatibleIComparer.cs
- EventListener.cs
- HasCopySemanticsAttribute.cs
- ScrollViewer.cs
- TdsParserSessionPool.cs
- ChangePasswordDesigner.cs
- BuilderElements.cs
- ComponentEditorForm.cs
- MILUtilities.cs
- ServiceObjectContainer.cs
- TransportSecurityProtocol.cs
- SystemIPv4InterfaceProperties.cs
- EventLogLink.cs
- BasicCellRelation.cs
- UIAgentAsyncBeginRequest.cs
- Vector3D.cs
- ConfigUtil.cs
- DocumentViewerBaseAutomationPeer.cs
- XmlExtensionFunction.cs
- PeerDuplexChannelListener.cs
- SingleSelectRootGridEntry.cs
- ActivityCodeDomSerializationManager.cs
- TemplateControlBuildProvider.cs
- ScriptServiceAttribute.cs
- GroupJoinQueryOperator.cs
- SQLDateTime.cs
- DbModificationCommandTree.cs
- WindowsNonControl.cs
- ButtonChrome.cs
- SqlConnectionString.cs
- _NestedSingleAsyncResult.cs
- PathFigureCollectionConverter.cs
- WinFormsSpinner.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- MenuAutomationPeer.cs
- WebServiceHandlerFactory.cs
- OracleCommandBuilder.cs
- DataTablePropertyDescriptor.cs
- SafeNativeMethodsCLR.cs
- SmiEventStream.cs
- XmlSchemaProviderAttribute.cs
- ListBox.cs
- Ops.cs
- AuthenticationModuleElement.cs
- SmiRecordBuffer.cs
- ExecutionEngineException.cs
- ConditionalAttribute.cs
- HotCommands.cs
- WindowsAltTab.cs
- XmlSerializationWriter.cs
- IntSecurity.cs
- PropertyDescriptorCollection.cs
- WebServiceFault.cs
- AuthenticationManager.cs
- TraceSection.cs
- DataGridColumnHeadersPresenter.cs
- KeyTime.cs
- MenuItemCollection.cs
- RootContext.cs
- PasswordBoxAutomationPeer.cs
- AuthenticationConfig.cs
- DSASignatureFormatter.cs
- DesignTimeTemplateParser.cs
- listitem.cs
- DelayedRegex.cs
- ThicknessAnimationUsingKeyFrames.cs
- DbInsertCommandTree.cs
- UiaCoreApi.cs
- SchemaDeclBase.cs
- DbProviderFactories.cs
- HttpApplicationStateWrapper.cs
- SerializationAttributes.cs
- HeaderLabel.cs
- AuthenticationSection.cs
- QueryResponse.cs
- IndentedWriter.cs
- ProtectedConfiguration.cs
- ParserOptions.cs
- SymbolMethod.cs
- BehaviorDragDropEventArgs.cs
- MouseGesture.cs
- DetailsViewUpdateEventArgs.cs
- Serializer.cs
- PathGradientBrush.cs
- MtomMessageEncoder.cs
- AsyncPostBackErrorEventArgs.cs
- DataGridViewCellValueEventArgs.cs
- InstanceStoreQueryResult.cs
- SQLGuidStorage.cs
- ApplicationSettingsBase.cs
- AssemblyInfo.cs
- VerticalAlignConverter.cs
- TickBar.cs
- HttpTransportBindingElement.cs
- GregorianCalendar.cs
- CornerRadiusConverter.cs