string res = "";
foreach(Control ctn in this.Controls)
{
if(ctn is Button)
{
Button btn = ((Button)ctn);
res += btn.Text + "|";
}
}
MessageBox.Show(res);