Repeat Char - CSharp System

CSharp examples for System:Char

Description

Repeat Char

Demo Code


using System.Web;
using System.Text;
using System.Security.Cryptography;
using System.Linq;
using System.Collections.Generic;
using System;//from   ww w . ja  v a  2s  . c  o  m

public class Main{
        public static string RepeatChar(char c, int count)
        {
            string str = "";
            for (int i = 0; i < count; i++)
            {
                str += c;
            }

            return str;
        }
}

Related Tutorials