Programing/C#

[초보자용]버튼 클릭시 TextEdit, TextBox 내용 지우기

꿀주세요 2018. 6. 15. 14:31

버튼 클릭시 TextBox나 TextEdit에 있는 내용을 지워보겠습니다



private void simpleButton4_Click(object sender, EventArgs e)
{
        Name.Text = string.Empty;
}

 

(TextBox, TextEdit 이름).Text = string.Empty;





< 결과 >

클리어 버튼 클릭시 (이름)칸 TextEdit이 지워진 것을 볼 수 있습니다.