public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string)) { ClassWithStringConverter c = value as ClassWithStringConverter; if (c == null) { throw new ArgumentException(); } return("(" + c.X.ToString() + "," + c.Y.ToString() + ")"); } return(false); }
public ClassWithNestedMEExtension2() { IntData = 1; InstanceOfClassWithStringConverter = new ClassWithStringConverter(); ComplexTypeInstance = new ComplexType(); }
public ComplexTypeExtension2() { IntData = 100; InstanceOfClassWithStringConverter = new ClassWithStringConverter(); }
public MEWithStringConvertersContainer() { InstanceOfClassWithStringConverter = new ClassWithStringConverter(); this.InstanceOfClassWithMEConverter = new ClassWithNestedMEConverter2(); }