I have the following snippet of code:
public static List<string> sqlData = new List<string>();
//
// lots of code here
//
if (/* check here to see if the sqlData[whatever] index exists */)
{
sqlData.Insert(count2, sqlformatted);
}
else
{
sqlData.Insert(count2, sqlformatted + sqlData[count2]);
}
What I want to know is how to check the index on sqlData to see if it exists before trying to insert something that contains itself.