KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Given the variable string ids = Request.QueryString["ids"]; // "1,2,3,4,5"; Is there any way to convert it into a List without doing something like List<int> myList = new List<int>(); foreach (string id in ids.Split(',')) { if (int.TryParse(id)) { myList.Add(Convert.ToInt32(id)); } }
Tags (comma-separated)
Save Edits
Cancel