vb.net中split的疑问

vb.net中split的疑问,第1张

概述Public Class SplitTest Public Shared Sub Main() Dim words As String = "This is a list of words, with: a bit of punctuation" + _ vbTab + "and a tab character."
Public Class SplitTest    Public Shared Sub Main()        Dim words As String = "This is a List of words,with: a bit of punctuation" + _                              vbTab + "and a tab character."        Dim split As String() = words.Split(New [Char]() {" "c,","c,"."c,":"c,CChar(vbTab) })        For Each s As String In  split            If s.Trim() <> "" Then                Console.Writeline(s)            End If        Next s    End Sub 'MainEnd Class 'SplitTest' The example displays the following output to the console:'       This'       is'       a'       List'       of'       words'       with'       a'       bit'       of'       punctuation'       and'       a'       tab'       character


两个问题:

1、dim a( ) as string
dim a as string( )
两者有啥区别?





2、split后面的成员列表是分隔符的列表么?只见过一个分隔关键字的,没见过多个的,有知道的么?
@H_301_15@

    {" "c,CChar(vbTab) }
这几个成员是什么意思? 其中的c又是什么意思? 总结

以上是内存溢出为你收集整理的vb.net中split的疑问全部内容,希望文章能够帮你解决vb.net中split的疑问所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1284354.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存