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
- TextModifier.cs
- Vector3DCollection.cs
- FixedDocument.cs
- RightNameExpirationInfoPair.cs
- ListControlConvertEventArgs.cs
- ObjectConverter.cs
- StylusEditingBehavior.cs
- HebrewCalendar.cs
- BinaryMethodMessage.cs
- oledbmetadatacollectionnames.cs
- AnnotationAdorner.cs
- SecurityTokenValidationException.cs
- KeyInfo.cs
- SocketAddress.cs
- CompilerGeneratedAttribute.cs
- SerializationException.cs
- QuadraticBezierSegment.cs
- PropertyReferenceSerializer.cs
- RadioButtonFlatAdapter.cs
- HostProtectionPermission.cs
- MsmqBindingElementBase.cs
- PtsHelper.cs
- ProcessHost.cs
- RequestCacheValidator.cs
- SiteMapSection.cs
- NetworkCredential.cs
- OutputCacheSettingsSection.cs
- InternalTypeHelper.cs
- ObjectKeyFrameCollection.cs
- ConfigXmlAttribute.cs
- WebPartConnectionsEventArgs.cs
- storepermission.cs
- CellParaClient.cs
- EntityContainerEntitySet.cs
- ToolStripInSituService.cs
- MethodBuilderInstantiation.cs
- WebProxyScriptElement.cs
- WpfSharedBamlSchemaContext.cs
- IsolatedStorageFilePermission.cs
- LoginNameDesigner.cs
- HMACSHA384.cs
- ACE.cs
- validationstate.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- ObjectResult.cs
- SchemaImporterExtension.cs
- SHA1.cs
- AppearanceEditorPart.cs
- DataTableExtensions.cs
- RepeaterItemCollection.cs
- ListViewGroup.cs
- ConnectionPoint.cs
- HttpProfileBase.cs
- UnsafeNativeMethods.cs
- Transform3DCollection.cs
- CircleHotSpot.cs
- EnvironmentPermission.cs
- XmlSchemaAttribute.cs
- TabletDeviceInfo.cs
- BamlBinaryReader.cs
- FileSystemEnumerable.cs
- StandardBindingOptionalReliableSessionElement.cs
- RSACryptoServiceProvider.cs
- StrongNameUtility.cs
- SQLChars.cs
- DLinqTableProvider.cs
- TemplateKeyConverter.cs
- TabControl.cs
- ArrangedElementCollection.cs
- WebScriptClientGenerator.cs
- COAUTHINFO.cs
- Profiler.cs
- Keyboard.cs
- XPathChildIterator.cs
- EntityRecordInfo.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- DataColumnMapping.cs
- ToolStripRenderer.cs
- ListItemCollection.cs
- ECDiffieHellmanCngPublicKey.cs
- CharAnimationBase.cs
- MdiWindowListStrip.cs
- ConfigurationLocation.cs
- OrderingQueryOperator.cs
- LinqDataSourceEditData.cs
- StreamMarshaler.cs
- MasterPageBuildProvider.cs
- Converter.cs
- RepeatInfo.cs
- ConfigXmlSignificantWhitespace.cs
- OleDbParameter.cs
- CellConstant.cs
- IDispatchConstantAttribute.cs
- SynchronizationScope.cs
- MenuItem.cs
- ProgressBar.cs
- PnrpPermission.cs
- ProfileInfo.cs
- TerminatorSinks.cs
- oledbconnectionstring.cs