The solution was not in the code but in the way of calling the function.
this is the way i did it:
private void txtName_Leave(object sender, EventArgs e)
{
txtManufacturerName.Text = CapitalizeFirstLetters(txtManufacturerName.Text);
}
thanks everyone for the help.