/// <include file='../docs.xml' /// path='docs/doc[@name="M:PeterO.ArrayUtil.ArrayToString``1(System.Collections.Generic.IEnumerable{``0})"]/*'/> public static string ArrayToString <T>(IEnumerable <T> array) { if (array == null) { return("null"); } var b = new StringBuilder(); b.Append("{"); var first = true; foreach (T value in array) { if (!first) { b.Append(", "); } b.Append(InvariantText.Format(String.Empty + value)); first = false; } b.Append("}"); return(b.ToString()); }
/// <include file='../docs.xml' /// path='docs/doc[@name="M:PeterO.ArrayUtil.ArrayToStringHex(System.Collections.Generic.IEnumerable{System.Int32})"]/*'/> public static string ArrayToStringHex(IEnumerable <int> array) { if (array == null) { return("null"); } var b = new StringBuilder(); b.Append("{"); var first = true; foreach (int value in array) { if (!first) { b.Append(", "); } b.Append(InvariantText.Format("0x" + "{0:X}", value)); first = false; } b.Append("}"); return(b.ToString()); }