از این کامپوننت برای نمایش پیغامهای خطا و هشدار در UI استفاده میشود.
private void textBox1_Leave(object sender, EventArgs e)
{
ErrorProvider ep = new ErrorProvider();
if (string.IsNullOrEmpty(textBox1.Text))
ep.SetError(textBox1, "نمیتواند خالی باشد");
else
ep.SetError(textBox1, "");
}