Let\'s say I have a web page that currently accepts a single ID value via a url parameter:
http://example.com/mypage.aspx?ID=1234
I want to change it to acce
Final code snippet that takes what I hope is the best from all the suggestions:
Function GetIDs(ByVal IDList As String) As List(Of Integer)
Dim SplitIDs() As String = IDList.Split(new Char() {","c}, StringSplitOptions.RemoveEmptyEntries)
GetIDs = new List(Of Integer)(SplitIDs.Length)
Dim CurID As Integer
For Each id As String In SplitIDs
If Integer.TryParse(id, CurID) Then GetIDs.Add(CurID)
Next id
End Function
I was hoping to be able to do it in one or two lines of code inline. One line to create the string array and hopefully find something in the framework I didn't already know to handle importing it to a List