protected void Button2_Click(object sender, EventArgs e)
{
int j = 0;
string myString = TextBox1.Text;
char[] ch = myString.ToCharArray();
foreach (char a in ch)
{
if (a.ToString().Equals("a"))
{
j = j + 1;
}
}
TextBox1.Text = j.ToString();
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment