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
- StaticFileHandler.cs
- Attributes.cs
- RotateTransform.cs
- MethodBody.cs
- SelectionPattern.cs
- SiteMapNodeCollection.cs
- ControlDesigner.cs
- WebBrowserEvent.cs
- BamlResourceSerializer.cs
- WindowsStartMenu.cs
- Line.cs
- TemplateGroupCollection.cs
- StandardCommands.cs
- FixedNode.cs
- TextBox.cs
- ComplexTypeEmitter.cs
- SecurityToken.cs
- BuildTopDownAttribute.cs
- ParameterCollection.cs
- Crypto.cs
- BitmapCache.cs
- TrackingConditionCollection.cs
- TemplateField.cs
- SpecialNameAttribute.cs
- CollectionChangeEventArgs.cs
- PropertyPushdownHelper.cs
- SwitchExpression.cs
- SimpleType.cs
- TrustManagerMoreInformation.cs
- PropertyMapper.cs
- __Filters.cs
- DispatcherTimer.cs
- FileRecordSequenceCompletedAsyncResult.cs
- SystemUnicastIPAddressInformation.cs
- ModifierKeysValueSerializer.cs
- SQLBinary.cs
- Model3D.cs
- AnnotationStore.cs
- PropertySegmentSerializationProvider.cs
- SettingsSection.cs
- HostedHttpRequestAsyncResult.cs
- WrapPanel.cs
- LoginCancelEventArgs.cs
- MethodImplAttribute.cs
- ControlValuePropertyAttribute.cs
- InstanceData.cs
- COM2EnumConverter.cs
- Expressions.cs
- ViewRendering.cs
- Application.cs
- XmlSchemaGroup.cs
- PageStatePersister.cs
- StructuredProperty.cs
- ProcessModelInfo.cs
- serverconfig.cs
- ListViewItemMouseHoverEvent.cs
- TemplateInstanceAttribute.cs
- SystemWebCachingSectionGroup.cs
- XPathQilFactory.cs
- BindingBase.cs
- CategoryNameCollection.cs
- ProxyWebPart.cs
- RenderOptions.cs
- SQLByteStorage.cs
- ConcurrentStack.cs
- RepeaterItem.cs
- HttpInputStream.cs
- SystemIPAddressInformation.cs
- TypeForwardedToAttribute.cs
- BitmapDecoder.cs
- DataServiceQueryProvider.cs
- ChildChangedEventArgs.cs
- HelpProvider.cs
- DataBoundLiteralControl.cs
- DateTimeValueSerializer.cs
- arclist.cs
- TableProviderWrapper.cs
- RouteParser.cs
- WsatExtendedInformation.cs
- SolidColorBrush.cs
- TextViewBase.cs
- ValidatorCollection.cs
- IndexingContentUnit.cs
- SettingsBindableAttribute.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ConfigXmlCDataSection.cs
- FileDialog_Vista.cs
- Oid.cs
- ExpandedWrapper.cs
- DataListCommandEventArgs.cs
- KerberosSecurityTokenProvider.cs
- LoadWorkflowAsyncResult.cs
- Operators.cs
- ManagementEventWatcher.cs
- TransportDefaults.cs
- HttpListenerContext.cs
- CodeEventReferenceExpression.cs
- CqlLexer.cs
- COAUTHIDENTITY.cs
- TransformCollection.cs