public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("Description : ").AppendLine(Description); sb.Append("MacAddress : ").AppendLine(MacAddress); sb.Append("Index : ").AppendLine(Index.ToString()); sb.Append("Id : ").AppendLine(Id.ToString()); sb.Append("Type : ").AppendLine(AdapterType); sb.Append("DHCP : ").AppendLine(Dhcp.ToString()); sb.AppendLine("Gateways :"); foreach (IpAddressInfo item in Gateways) { sb.AppendLine(item.ToString()); } sb.AppendLine("IpAdresses :"); foreach (IpAddressInfo item in IpAddresses) { sb.AppendLine(item.ToString()); } return(sb.ToString()); }