public override string ToString() { StringBuilder sb = new StringBuilder(base.ToString()); sb.AppendLine(); sb.AppendFormat(SQLMessage.ExClientConnectionId(), _clientConnectionId); // Append the error number, state and class if the server provided it if (Number != 0) { sb.AppendLine(); sb.AppendFormat(SQLMessage.ExErrorNumberStateClass(), Number, State, Class); } // If routed, include the original client connection id if (Data.Contains(OriginalClientConnectionIdKey)) { sb.AppendLine(); sb.AppendFormat(SQLMessage.ExOriginalClientConnectionId(), Data[OriginalClientConnectionIdKey]); } // If routed, provide the routing destination if (Data.Contains(RoutingDestinationKey)) { sb.AppendLine(); sb.AppendFormat(SQLMessage.ExRoutingDestination(), Data[RoutingDestinationKey]); } return(sb.ToString()); }