How to build a string

cortez081

New member
Joined
Mar 17, 2008
Messages
4
Programming Experience
Beginner
Hello, I'm new at visual basic and I wonder how to build a string.

Value = 1 and name McCullin
Value = 2 and name Bradford

I would like to make them manually, because there are only a few.

Thanks!
 
VB.NET:
Dim Name1 As String = "McCullin"
Dim Name2 As String = "Bradford"

or do you mean:
VB.NET:
Dim Name As String = String.Empty
Select Case Value
  Case 1 : Name = "McCullin"
  Case 2 : Name = "Bradford"
End Select
 
Or, by the looks of it he might be wanting to use a hashtable.

VB.NET:
Dim _hash As Hashtable = New Hashtable()
_hash("McCullin") = 1
_hash("Bradford") = 2
 
Back
Top