Repeat char by count time - CSharp System

CSharp examples for System:DateTime

Description

Repeat char by count time

Demo Code

// Copyright (c)2008-2011 Mark II Software, LLC.  All Rights Reserved.
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//w  w  w .j a v a2  s.  co m

public class Main{
        public static string Repeat(this char c, int count)
        {
            StringBuilder sb = new StringBuilder(count);
            for (int ix = 0; ix < count; ix++)
                sb.Append(c);
            return sb.ToString();
        }
}

Related Tutorials