Ejemplo n.º 1
0
        public static string ToDisplayString(Array array)
        {
            if (array == null)
            {
                return("<nullArray>");
            }
            if (array.Length == 0)
            {
                return("<emptyArray>");
            }
            StringBuilder stringBuilder = new StringBuilder();

            foreach (object obj in array)
            {
                if (stringBuilder.Length > 0)
                {
                    stringBuilder.Append(", ");
                }
                stringBuilder.Append(HelperMethods.ToDisplayString(obj));
            }
            if (stringBuilder.Length > 0)
            {
                stringBuilder.Insert(0, '[');
                stringBuilder.Append(']');
            }
            return(stringBuilder.ToString());
        }