以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  数组如何先定义再赋值?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=137095)

--  作者:诚学思行
--  发布时间:2019/6/28 9:02:00
--  数组如何先定义再赋值?
Dim strs As String = "a|b|c....|z"

\'方法1
Dim str() As String = strs.Split("|")

\'方法2
Dim str() As String
str = ? 这里怎么赋值?

--  作者:有点甜
--  发布时间:2019/6/28 9:07:00
--  

先定义再赋值,请使用集合,如

 

http://www.foxtable.com/webhelp/topics/0217.htm

 

如果直接赋值,参考

 

str = new string() {"123", "abc"}