Cut string and display three dots

image_pdfimage_print
   
 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


    public static class StringOp
    {
        public static string CutString(string OldString, int iLength)
        {
            if (OldString.Length > iLength)
            {
                OldString = OldString.Substring(0, iLength) + "...";
            }
            return OldString;
        }
    }

   
     


This entry was posted in Data Types. Bookmark the permalink.