My last snippet works for integers from 1 to MaxInt. Try it!
This snippet just tells you how it could be done. How it should be done is entirly up to you to decide.
Another possibility is the use of the SubString method and to concatenate all the substrings together with ",".