Create a Public Shared Class
with your List(Of String)
there to use it anywhere in the project:
Public Shared Class DataHolder
Private _block As New List(Of String)
Public Property Block As List(Of String)
Get
Return _block
End Get
Set
_block = value
End Set
End Property
End Class
Example:
Either simply use DataHolder.Block.Add(splitword)
OR following steps:
Declare a class variable
block
to use it in entire class:Private block As List(Of String)
Initialize it in some suitable function / event-handler like
Form_Load
:block = DataHolder.Block
Do the operation:
block.Add(splitword)