private static string FormatMessage(IEnumerable<string> errors) { var result = new StringBuilder("The following types may not be used as proxies:"); foreach (string error in errors) { result.Append('\n').Append(error); } return result.ToString(); }