System.Net.Configuration.WebRequestModuleElement.TypeTypeConverter.ConvertTo C# (CSharp) Method

ConvertTo() public method

public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object
destinationType System.Type
return object
            public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) {
                if (destinationType == typeof(string)) {
                    TypeAndName castedValue = (TypeAndName) value;
                    return castedValue.name == null ? castedValue.type.AssemblyQualifiedName : castedValue.name;
                }

                return base.ConvertTo(context, culture, value, destinationType);
            }
        }
WebRequestModuleElement.TypeTypeConverter