【发布时间】:2013-09-21 05:39:04
【问题描述】:
假设我有一个结构
Structure Test
Public Names as List(Of Strings)
End Structure
我收到错误
A first chance exception of type 'System.NullReferenceException' occurred
所以我进入了代码,每次向名称添加字符串时都会出错
例子:
Dim a as new Test
Dim b = 1
While b < 2
if b = 1 then
a.add("Cheese")
End If
b += 1
End While
a.add("Cheese") 会抛出错误
有什么想法吗?
【问题讨论】:
标签: vb.net structure runtime-error