Pour résoudre votre problème, vous pouvez utiliser la bibliothèque NHunspell.
Votre méthode de contrôle dans ce cas est très simple et ressemble à ceci:
bool CheckSpell(string word)
{
using (Hunspell hunspell = new Hunspell("en_GB.aff", "en_GB.dic"))
{
return hunspell.Spell(word);
}
}
Vous pouvez trouver des dictionnaires sur this site.
Vous pouvez également utiliser la classe SpellCheck:
bool CheckSpell(string word)
{
TextBox tb = new TextBox();
tb.Text = word;
tb.SpellCheck.IsEnabled = true;
int index = tb.GetNextSpellingErrorCharacterIndex(0, LogicalDirection.Forward);
if (index == -1)
return true;
else
return false;
}
double possible de [? Quelle est la meilleure bibliothèque de vérification orthographique pour C#] (http://stackoverflow.com/questions/453611/what-is-the -best-spell-vérification-bibliothèque-pour-c) –