CSharp examples for System:String SubString
Shorten Text String
using System.Web; using System.Linq; using System.Collections.Generic; using System;/*ww w .j ava 2 s . c o m*/ public class Main{ public static String ShortenText(String text, int maxLength) { String shortText = text; if (text != null && text.Length > maxLength) shortText = text.Substring(0, maxLength - 3) + "..."; return shortText; } }