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
- AnimationTimeline.cs
- ThreadNeutralSemaphore.cs
- ConfigXmlReader.cs
- NotImplementedException.cs
- ListViewTableRow.cs
- DropSourceBehavior.cs
- PeerMaintainer.cs
- CombinedGeometry.cs
- StateFinalizationDesigner.cs
- CheckedListBox.cs
- EntryIndex.cs
- WebServiceFaultDesigner.cs
- PerfService.cs
- DataFormat.cs
- ClientConfigPaths.cs
- ValueType.cs
- GroupBoxAutomationPeer.cs
- Point.cs
- HyperLink.cs
- MatrixTransform3D.cs
- EditorPartChrome.cs
- XsdBuildProvider.cs
- ScopelessEnumAttribute.cs
- ChainedAsyncResult.cs
- SqlDataSourceFilteringEventArgs.cs
- WebPartEventArgs.cs
- TheQuery.cs
- SmtpMail.cs
- DoubleAnimation.cs
- ValueChangedEventManager.cs
- X509ServiceCertificateAuthenticationElement.cs
- DictionaryBase.cs
- FileDialog.cs
- XmlAnyAttributeAttribute.cs
- CodeGotoStatement.cs
- SafeReadContext.cs
- SendActivityDesigner.cs
- Vector.cs
- XmlSchemaElement.cs
- MappingException.cs
- COAUTHIDENTITY.cs
- SectionRecord.cs
- RadioButtonAutomationPeer.cs
- PropertyDescriptors.cs
- ProcessHostServerConfig.cs
- DataGridHeaderBorder.cs
- PropertyCollection.cs
- OleDbDataAdapter.cs
- IndicCharClassifier.cs
- Root.cs
- FontInfo.cs
- FontFamilyConverter.cs
- TreeIterator.cs
- BindingUtils.cs
- DataList.cs
- SeparatorAutomationPeer.cs
- MouseActionConverter.cs
- RC2.cs
- ManifestResourceInfo.cs
- ChangePassword.cs
- TopClause.cs
- Vector3DAnimation.cs
- ListBoxAutomationPeer.cs
- AdPostCacheSubstitution.cs
- CodePropertyReferenceExpression.cs
- DLinqColumnProvider.cs
- DocumentReference.cs
- EventData.cs
- GenericTextProperties.cs
- PointHitTestResult.cs
- ContainerParaClient.cs
- ProvidersHelper.cs
- HttpHeaderCollection.cs
- _WinHttpWebProxyDataBuilder.cs
- TextSpanModifier.cs
- TrustLevelCollection.cs
- WsdlParser.cs
- RequestTimeoutManager.cs
- AsymmetricAlgorithm.cs
- MemberRelationshipService.cs
- Schedule.cs
- MarginCollapsingState.cs
- XmlMemberMapping.cs
- SiteMapNodeCollection.cs
- HttpHandlersSection.cs
- Label.cs
- Vector.cs
- HttpProxyCredentialType.cs
- DataGridItem.cs
- UnsafeNativeMethods.cs
- altserialization.cs
- FixUp.cs
- XmlSchemaInclude.cs
- ISAPIRuntime.cs
- GeometryDrawing.cs
- RefExpr.cs
- GeneratedCodeAttribute.cs
- StyleModeStack.cs
- ObjectAnimationUsingKeyFrames.cs
- DataGridViewSelectedColumnCollection.cs