Wenn ich im folgenden den auskommentierten Bereich aktiviere, komme ich an
der Stelle in eine Endlosschleife, wenn Char.IsPunctuation(textBox.Text[i])
wahr ist. Woran kann das liegen?
Gru�, Andreas
void checkWholeTextBox()
{
string Correct="";
int i;
for(i=0;i<textBox.Text.Length; i++)
{
if(checkCharValid(textBox.Text[i]))
{
/*
if(Char.IsPunctuation(textBox.Text[i]))
{
Correct = Correct+"0";
}
Correct = Correct+textBox.Text[i];
*/
}
}
if(Correct.Length==0)
{
Correct="0";
}
textBox.Text=Correct;
}
bool checkCharValid(char HasToBeOnlyOneChar)
{
return
(Char.IsNumber(HasToBeOnlyOneChar)||Char.IsPunctuation(HasToBeOnlyOneChar));
}
_______________________________________________
Csharp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/csharp.net