VB.NET Empty String Array

后端 未结 10 951
花落未央
花落未央 2021-01-07 17:56

How can I create an empty one-dimensional string array?

10条回答
  •  旧巷少年郎
    2021-01-07 18:42

    Another way of doing this:

    Dim strings() As String = {}
    

    Testing that it is an empty string array:

    MessageBox.Show("count: " + strings.Count.ToString)
    

    Will show a message box saying "count: 0".

提交回复
热议问题