2 // System.ComponentModel.CollectionConverter
5 // Martin Willemoes Hansen (mwh@sysrq.dk)
6 // Andreas Nahr (ClassDevelopment@A-SoftTech.com)
8 // (C) 2003 Martin Willemoes Hansen
9 // (C) 2003 Andreas Nahr
12 using System.Collections;
13 using System.Globalization;
15 namespace System.ComponentModel
17 public class CollectionConverter : TypeConverter
20 public CollectionConverter()
24 public override object ConvertTo (ITypeDescriptorContext context,
25 CultureInfo culture, object value, Type destinationType)
27 if (destinationType == typeof (string))
28 if (value != null && (value is ICollection))
29 return "(Collection)";
31 return base.ConvertTo (context, culture, value, destinationType);
34 public override PropertyDescriptorCollection GetProperties (ITypeDescriptorContext context,
35 object value, Attribute[] attributes)
40 public override bool GetPropertiesSupported (ITypeDescriptorContext context)