But your code is correct.
if ((e.KeyChar=='.' && textBox1.Text.IndexOf('.')>-1) || char.IsLetter(e.KeyChar) || char.IsPunctuation(e.KeyChar) || char.IsSymbol(e.KeyChar))
{
e.Handled = true;
}
You are checking the char is . in the first condition and returing true.Why it is going for the next Or condition.