Shortened the string.
// //------------------------------------------------------------------------------ // // <copyright file="" company="Dascoba Development"> // // Copyright Dascoba Development 2010 // // </copyright> // //------------------------------------------------------------------------------ namespace Dascoba.Umb.FileManager.Support { using System; using System.IO; using System.Linq; public static class Util { /// <summary> /// Shortened the string. /// </summary> /// <param name = "value">The value.</param> /// <param name = "maxChars">The max chars.</param> /// <returns></returns> internal static string ShortenedString(string value, int maxChars) { if (value.Length > maxChars) { return value.Substring(0, maxChars) + "..."; } return value; } } }
String