vb.net:清除字符串数组的所有内容

l--*_*''' 5 vb.net

我有这个:

    Dim split As String() = temp_string.Split(",")

    ''#feed all info into global variables
    patient_id = split(0)
    doc_name = split(1)
    lot__no = split(2)
    patient_name = split(3)
Run Code Online (Sandbox Code Playgroud)

我该如何清除split()的所有内容?

Cha*_*ion 13

Array.Clear(split, 0, split.Length)
Run Code Online (Sandbox Code Playgroud)


Sea*_*ean 5

无需做任何事情.垃圾收集器将清除变量.将每个变量显式设置为空都会降低应用程序的速度.