سلام.
من برای چک کردن ورودی یک تکست باکس از متد زیر استفاده کردم. ولی نمیدونم چرا گاهی اوقات استثنای(object reference not set to an instance of an object) رخ میده. چرا ؟
public bool chkletter(string str)
{
foreach (char c in str)
{
if (!char.IsLetter(c))
return false;
}
return true;
}
متشکرم