コード例 #1
0
 public override object ConvertFrom
     (ITypeDescriptorContext context, CultureInfo culture, object text_obj)
 {
     if (text_obj is string)
     {
         string           text = (string)text_obj;
         NestedTestObject tb   = new NestedTestObject(text);
         return(tb);
     }
     return(base.ConvertFrom(context, culture, text_obj));
 }
コード例 #2
0
 public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object text_obj)
 {
     if (text_obj is string)
     {
         string text = (string) text_obj;
         NestedTestObject tb = new NestedTestObject(text);
         return tb;
     }
     return base.ConvertFrom(context, culture, text_obj);
 }