//추가 기능들을 제작하기 위한 보조 클래스를 생성
static class ExtentionMethods
{
public static int CountChar(this string sourceText, char targetChar)
{
int count = 0;
foreach (char c in sourceText)
{
if (c == targetChar) count++;
}
return count;
}
}
static void Main(string[] args)
{
string text = "Develoket";
int count = text.CountChar('e');
Console.WriteLine(count);
}