public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) { if (destType == typeof(string) && value is SyncLocation) { // Cast the value to an Employee type SyncLocation emp = (SyncLocation)value; // Return department and department role separated by comma. return(emp.IpAddress + ", " + emp.Name); } return(base.ConvertTo(context, culture, value, destType)); }
/// <summary> /// Removes an employee object from the collection /// </summary> /// <param name="emp"></param> public void Remove(SyncLocation emp) { this.List.Remove(emp); }
/// <summary> /// Adds an employee object to the collection /// </summary> /// <param name="emp"></param> public void Add(SyncLocation emp) { this.List.Add(emp); }