Exposing Type Information
Details Related Types
Site:  C#Today
Original URL:  http://www.csharptoday.com/content/articles/20011130.asp
Summary:
In his previous article, Morgan Skinner looked at the TypeDescriptor class, and how it could be used to retrieve various pieces of information from a type (or object). In certain situations however, you might want to augment or bypass the information returned from the TypeDescriptor, and in order to do this you need to implement the ICustomTypeDescriptor interface on your type. In this article, Morgan examines the ICustomTypeDescriptor interface, and show some examples of where it might be used, such as to to construct a list of properties on the fly when reading records from a database and displaying them on screen. Using the ICustomTypeDescriptor interface, it is possible to give each record its own list of properties, which might be useful if you want to permit or deny access to those properties based on some row level security settings.
System.ArgumentException
System.ArgumentNullException
System.Attribute
System.ComponentModel.AttributeCollection
System.ComponentModel.DescriptionAttribute
System.ComponentModel.EventDescriptor
System.ComponentModel.EventDescriptorCollection
System.ComponentModel.ICustomTypeDescriptor
System.ComponentModel.MemberDescriptor
System.ComponentModel.PropertyDescriptor
System.ComponentModel.PropertyDescriptorCollection
System.ComponentModel.TypeConverter
System.ComponentModel.TypeDescriptor
System.Data.DataColumn
System.Data.DataRowView
System.Data.DataTable
System.Data.DataView
System.Reflection.BindingFlags
System.Reflection.FieldInfo
System.Type
System.Web.UI.AttributeCollection
System.Windows.Forms.PropertyGrid
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com