vb.net - How to assign a value to an array from a combobox -
the code have is:
dim dbase() string = nil dbase(0) = db_combobox.text
i have declared dbase
array , assigned nothing
, db_combobox
combobox.
for assignment statement, i'm getting next error: "reference 'dbase' has value of 'nothing'"
what reason error, , how can take value combobox , save in array?
let's @ code:
dim dbase() string = nil dbase(0) = db_combobox.text
especially first line. first line creates variable can refer array, = nothing
portion explicitly tells it, "do not create real array here yet". have, effectively, pointer doesn't point anything.
i here need list collection can append on time:
dim dbase new list(of string)() dbase.add(db_combobox.text)
vb.net
No comments:
Post a Comment