J'utilise C de SharpIl y a pas de ligne à la position 5
I Get Cette erreur après l'exécution du débogueur pour voir wat est le problème avec le code:
{ "Il n'y a pas de ligne à la position 5 . "} {System.Exception System.IndexOutOfRangeException}
public DataSet FindData(string ID, string pass)
{
InitializeConnection();
m_oCn.Open();
DataSet thisDataSet = new DataSet();
DataSet foundDataSet = new DataSet();
try
{
m_oDA.Fill (thisDataSet, "Login");
for (int n = 0; 0 < thisDataSet.Tables["Login"].Rows.Count ; n++)
{
if (thisDataSet.Tables["Login"].Rows[n]["UserName"].ToString() == ID)
{
if (thisDataSet.Tables["Login"].Rows[n]["Password"].ToString() == pass)
{
m_oDA.Fill(foundDataSet,n,1,"Login");
}
}
}
}
catch
{
}
finally
{
m_oCn.Close();
m_oCn = null;
}
return foundDataSet;
Merci OK Je l'obtiens maintenant..THanks pour l'expliquer. (Y) – user2121793