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
- SingleSelectRootGridEntry.cs
- DependencyPropertyAttribute.cs
- Stylus.cs
- TransportContext.cs
- PersistChildrenAttribute.cs
- Select.cs
- ImageSourceConverter.cs
- ExpressionList.cs
- CodeMemberEvent.cs
- NumericPagerField.cs
- AdjustableArrowCap.cs
- DbMetaDataCollectionNames.cs
- PartialTrustVisibleAssembliesSection.cs
- UdpDuplexChannel.cs
- ProbeMatchesCD1.cs
- ResXResourceWriter.cs
- AdapterUtil.cs
- SafeCancelMibChangeNotify.cs
- SystemWebExtensionsSectionGroup.cs
- VectorCollectionValueSerializer.cs
- DPCustomTypeDescriptor.cs
- RoleService.cs
- Page.cs
- SqlNodeAnnotation.cs
- TraceHelpers.cs
- Int32CAMarshaler.cs
- CodeTypeDeclaration.cs
- CodeDelegateCreateExpression.cs
- PasswordTextContainer.cs
- BigInt.cs
- ClientFormsIdentity.cs
- SymmetricCryptoHandle.cs
- DataGridToolTip.cs
- FillRuleValidation.cs
- ConfigXmlReader.cs
- PenCursorManager.cs
- InvalidWorkflowException.cs
- Wizard.cs
- CultureTableRecord.cs
- Debugger.cs
- RealProxy.cs
- HtmlLiteralTextAdapter.cs
- SharedDp.cs
- MessageSecurityProtocol.cs
- ArrayMergeHelper.cs
- arabicshape.cs
- SimpleFileLog.cs
- sqlcontext.cs
- WebRequestModuleElement.cs
- WmpBitmapEncoder.cs
- CharEnumerator.cs
- RadialGradientBrush.cs
- MediaEntryAttribute.cs
- IDispatchConstantAttribute.cs
- ResourceDefaultValueAttribute.cs
- SmiRecordBuffer.cs
- FolderNameEditor.cs
- ProcessInputEventArgs.cs
- DupHandleConnectionReader.cs
- DataGridViewSelectedCellCollection.cs
- BitConverter.cs
- ConfigurationValidatorBase.cs
- OrderingQueryOperator.cs
- UICuesEvent.cs
- SamlDelegatingWriter.cs
- Drawing.cs
- SqlCacheDependency.cs
- FontResourceCache.cs
- StackSpiller.cs
- AccessText.cs
- StructuralType.cs
- StylusSystemGestureEventArgs.cs
- RectangleGeometry.cs
- WebBrowserDocumentCompletedEventHandler.cs
- TypedColumnHandler.cs
- XmlDataFileEditor.cs
- FileIOPermission.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ContextMarshalException.cs
- CheckPair.cs
- XamlReader.cs
- DecimalFormatter.cs
- BuildProviderCollection.cs
- IdleTimeoutMonitor.cs
- EraserBehavior.cs
- SoapSchemaExporter.cs
- FrameSecurityDescriptor.cs
- HashHelper.cs
- Scene3D.cs
- GridViewCancelEditEventArgs.cs
- RowType.cs
- FilteredXmlReader.cs
- WebPartEditorApplyVerb.cs
- DbProviderManifest.cs
- ComponentChangedEvent.cs
- CachedPathData.cs
- MessageParameterAttribute.cs
- LineBreakRecord.cs
- XmlSerializerObjectSerializer.cs
- XmlRootAttribute.cs