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
- Color.cs
- SQLInt64.cs
- MailWebEventProvider.cs
- FilterRepeater.cs
- EdmRelationshipRoleAttribute.cs
- MulticastIPAddressInformationCollection.cs
- DataGridViewLinkCell.cs
- BufferedGraphicsContext.cs
- PrtCap_Public.cs
- Rss20FeedFormatter.cs
- DataSourceControl.cs
- SecurityElement.cs
- CodeBinaryOperatorExpression.cs
- MenuItemCollection.cs
- mediaclock.cs
- XmlSchemas.cs
- StringInfo.cs
- CompilerState.cs
- GridViewUpdateEventArgs.cs
- SqlNotificationRequest.cs
- FileSystemInfo.cs
- LightweightCodeGenerator.cs
- HtmlImage.cs
- XmlDataLoader.cs
- TransformedBitmap.cs
- PeerToPeerException.cs
- XDRSchema.cs
- DataGridTable.cs
- ObjectManager.cs
- OpenTypeLayout.cs
- GroupQuery.cs
- ViewCellSlot.cs
- AmbientLight.cs
- HtmlInputCheckBox.cs
- TemplatedWizardStep.cs
- DefinitionBase.cs
- CodeExporter.cs
- GeneratedContractType.cs
- XmlReader.cs
- BaseParaClient.cs
- CmsUtils.cs
- StructuredProperty.cs
- ParameterCollection.cs
- MediaSystem.cs
- DesignerValidatorAdapter.cs
- Certificate.cs
- TextElement.cs
- TypeBuilderInstantiation.cs
- ServerTooBusyException.cs
- MethodRental.cs
- Geometry3D.cs
- SerializationTrace.cs
- BufferedStream.cs
- GridView.cs
- XmlDocumentFragment.cs
- CustomAttribute.cs
- control.ime.cs
- ExtensionSurface.cs
- HttpVersion.cs
- Pair.cs
- PaperSource.cs
- OdbcDataAdapter.cs
- InkCollectionBehavior.cs
- MarshalByRefObject.cs
- UnsafeNativeMethods.cs
- SmiEventStream.cs
- MemberDescriptor.cs
- InvalidProgramException.cs
- OracleConnection.cs
- ResourceReader.cs
- Delegate.cs
- DefinitionBase.cs
- DataObjectPastingEventArgs.cs
- UpdateDelegates.Generated.cs
- IisHelper.cs
- ReflectionTypeLoadException.cs
- IntegerFacetDescriptionElement.cs
- SoapAttributeOverrides.cs
- TableAutomationPeer.cs
- RectAnimation.cs
- externdll.cs
- ProtectedProviderSettings.cs
- SerializationException.cs
- AttributeProviderAttribute.cs
- Vector3DIndependentAnimationStorage.cs
- OnOperation.cs
- PropertyState.cs
- Transform3DGroup.cs
- Hash.cs
- InputBuffer.cs
- RegisteredArrayDeclaration.cs
- TextAutomationPeer.cs
- Trigger.cs
- ValueOfAction.cs
- Base64Stream.cs
- ColorIndependentAnimationStorage.cs
- RIPEMD160Managed.cs
- XmlElement.cs
- TextTreeTextNode.cs
- basecomparevalidator.cs