Code:
/ FX-1434 / FX-1434 / 1.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
- RootProfilePropertySettingsCollection.cs
- BulletChrome.cs
- OutputCacheProfileCollection.cs
- EventLogInternal.cs
- ContractsBCL.cs
- QueryValue.cs
- UnknownMessageReceivedEventArgs.cs
- precedingquery.cs
- AppearanceEditorPart.cs
- EdmTypeAttribute.cs
- SafePEFileHandle.cs
- Socket.cs
- SectionUpdates.cs
- NetworkInformationException.cs
- EditingCommands.cs
- ProxyManager.cs
- ColumnResizeAdorner.cs
- PointLightBase.cs
- DeviceSpecificDialogCachedState.cs
- GlobalEventManager.cs
- VisualTreeHelper.cs
- ImageFormat.cs
- XmlReflectionMember.cs
- RoleService.cs
- GroupItemAutomationPeer.cs
- MoveSizeWinEventHandler.cs
- XmlTextReaderImpl.cs
- ISessionStateStore.cs
- IDataContractSurrogate.cs
- ReceiveActivity.cs
- ProviderUtil.cs
- MatrixTransform.cs
- SmtpSection.cs
- EntryIndex.cs
- XmlUTF8TextReader.cs
- Knowncolors.cs
- CodeConditionStatement.cs
- ObjectManager.cs
- TouchFrameEventArgs.cs
- QuaternionRotation3D.cs
- DefaultEventAttribute.cs
- TypedTableBase.cs
- RoleGroupCollection.cs
- PrivacyNoticeElement.cs
- CodeIndexerExpression.cs
- ImageSourceValueSerializer.cs
- ActivityExecutionContext.cs
- XmlText.cs
- List.cs
- FormatConvertedBitmap.cs
- ProgramNode.cs
- ECDiffieHellmanCng.cs
- Help.cs
- ComplexObject.cs
- SqlBooleanMismatchVisitor.cs
- InvokeWebService.cs
- UnsafeNativeMethods.cs
- DeploymentSection.cs
- AppDomainGrammarProxy.cs
- ThumbButtonInfo.cs
- StylusCollection.cs
- SignedXml.cs
- Main.cs
- util.cs
- IntPtr.cs
- Transform3D.cs
- XmlSchemaSet.cs
- WindowsPen.cs
- FixedHyperLink.cs
- ExpandSegment.cs
- ResourceIDHelper.cs
- XmlTextReaderImpl.cs
- StringHandle.cs
- CreateUserWizardStep.cs
- ListenerElementsCollection.cs
- SystemResources.cs
- EncryptedReference.cs
- ProfileParameter.cs
- XmlSchemaExternal.cs
- EncodingStreamWrapper.cs
- ISAPIRuntime.cs
- EntityContainerEntitySetDefiningQuery.cs
- AppDomain.cs
- TextReader.cs
- ToolboxDataAttribute.cs
- ItemsChangedEventArgs.cs
- MouseGesture.cs
- ExpressionBindingsDialog.cs
- UnsignedPublishLicense.cs
- TranslateTransform.cs
- DBConnection.cs
- CorrelationManager.cs
- SingleSelectRootGridEntry.cs
- Message.cs
- ChildDocumentBlock.cs
- PathSegment.cs
- _ChunkParse.cs
- DataBoundControl.cs
- GroupJoinQueryOperator.cs
- WebPartTransformerCollection.cs