以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 字符转换 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=61473) |
-- 作者:lshshlxsh -- 发布时间:2014/12/13 7:58:00 -- 字符转换 dim k as string ="a,b,c,d"
请问如何把字符K转换为数组或者是集合? |
-- 作者:kylin -- 发布时间:2014/12/13 8:29:00 -- Dim k As String ="a,b,c,d" Dim Names As New List(Of String) For Each kk As String In k.Split(",") Names.Add(kk) Next |
-- 作者:lsy -- 发布时间:2014/12/13 8:38:00 -- Dim k As String = "a,b,c,d" \'字符转数组 Dim str As String() = k.Split(",") \'字符转集合 Dim lst As List(Of String) lst.AddRange(k.Split(","))
|
-- 作者:lshshlxsh -- 发布时间:2014/12/13 8:46:00 -- 谢谢! |