2 using System.Collections.Generic;
4 using System.ComponentModel;
7 namespace System.ServiceModel.Configuration
9 class IPAddressConverter
12 public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType) {
13 return sourceType == typeof (string);
16 public override object ConvertFrom (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
17 return IPAddress.Parse ((string) value);