Load resultset values to set of variables (not to a array)

I have a sparql query that can return minimum 1 value to maximum 15 values
I need to load them in to a set of string variables so i can use them in a sql parameterized query

my code is

for (int i = 0; i < resultSet.Count; i++)
    SparqlResult result = resultSet[i]; 
    Rlist[i] = result.ToString();

    correctList[i] = Rlist[i].Replace("?name = ", null);
     // Replace function is to remove the "?name =" part in the answers

I want to store values of correctList[] in a set of variables (not in a array) . to use them in a parameterized sql query. I cant give predefined number of variables since i cant exactly say how much elements that the resultset will return.

can any one suggest me how can i solve my problem or any other mechanisum that i can use.

Source: sql

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.