How to check repeated letters in a string c#

前端 未结 10 528
太阳男子
太阳男子 2020-12-21 01:39

I am creating a program that checks repeated letters in a string.

For Example:

wooooooooooow
happpppppppy

This is my

10条回答
  •  囚心锁ツ
    2020-12-21 02:01

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace Delegate
    {
        class Program
        {
           public int repeatcount(string str,char ch)
            {
    
                var count = 0;
                for (int i = 0; i

提交回复
热议问题