I also agree with Mehdi Gholam, this problem is very ordinary, you can convert each record (in constant) to string and adding it a counter (in loop) for generate its!
I wrote this recursive function and you can use it for generate:
string f(string ConstStr, int from, int to)
{
if (to == from)
return ConstStr + from + ",";
else
return f(ConstStr, from, to - 1) + ConstStr + to + ",";
}
Finally, you can pharse the sentence with "," like this:
string str = f("Mehdi", 1, 5);
string[] strArr = str.Split(new char[] { ',' });