this is code is repeate the values.but my questions it should be no repetation plz help me
plz find the document. if send,5,5-6. output is 5,1,2,34,5.but need to no repetation.
string output = null;
if (!String.IsNullOrEmpty(PagesId))
{
if (PagesId.Contains("-"))
{
string[] split = PagesId.Split(',');
string[] split2 = split[1].Split('-');
var sb = new System.Text.StringBuilder();
for (int i = int.Parse(split2[0]); i <= int.Parse(split2[1]); i++)
{
sb.Append(i.ToString());
sb.Append(",");
}
output = split[0] + "," + sb.ToString().TrimEnd(',');
}
else
{
output = PagesId;
}