Code Snippet(3)> clear ค่า 20 textbox ภายในคลิกเดี๋ยว
ทำการวนลูปภายใน form, แล้วตรวจสอบว่าเป็น textbox หรือเปล่า
foreach (Control tx in this.Controls)
{
if (tx.GetType() == typeof(System.Windows.Forms.TextBox))
{
tx.Text = "";
}
}
ให้ความเห็น