J jack Apr 29, 2004 #1 Hello, I need to plit: "1,34,54,123,34" Into an array list. Thanks for any help, Jack
J Jay B. Harlow [MVP - Outlook] Apr 29, 2004 #2 Jack, Have you tried using String.Split to split the string into an Array, then add the Array to the ArrayList. Something like: Dim values As String = "1,34,54,123,34" Dim list As New ArrayList list.AddRange(values.Split(","c)) Note: the ","c is a character literal, where as "," is a string literal. They both contain a single comma. Hope this helps Jay
Jack, Have you tried using String.Split to split the string into an Array, then add the Array to the ArrayList. Something like: Dim values As String = "1,34,54,123,34" Dim list As New ArrayList list.AddRange(values.Split(","c)) Note: the ","c is a character literal, where as "," is a string literal. They both contain a single comma. Hope this helps Jay
J jack Apr 29, 2004 #3 Thank you very much for your help!!!!! Jay B. Harlow said: Jack, Have you tried using String.Split to split the string into an Array, then add the Array to the ArrayList. Something like: Dim values As String = "1,34,54,123,34" Dim list As New ArrayList list.AddRange(values.Split(","c)) Note: the ","c is a character literal, where as "," is a string literal. They both contain a single comma. Hope this helps Jay Click to expand...
Thank you very much for your help!!!!! Jay B. Harlow said: Jack, Have you tried using String.Split to split the string into an Array, then add the Array to the ArrayList. Something like: Dim values As String = "1,34,54,123,34" Dim list As New ArrayList list.AddRange(values.Split(","c)) Note: the ","c is a character literal, where as "," is a string literal. They both contain a single comma. Hope this helps Jay Click to expand...