I am looking for a way to store maybe in an array or dictionary... two
fields....
first field would be a string... second would be a date...
for example.. if i called up myinfo(0) it would show "the first Day"
"1/1/2008" ???
Brian
Sounds to me you just need to make a custom class that has two
properties, label and date:
//////////////
Public Class YourClassNameHere
Private _Label As String = String.Empty
Private _TheDate As DateTime = DateTime.Now
Public Sub New()
End Sub
Public Sub New(ByVal label As String, ByVal theDate As DateTime)
Me.New()
Me.Label = label
Me.TheDate = TheDate
End Sub
Public Property Label As String
Get
Return _Label
End Get
Set (ByVal value As String)
_Label = value
End Set
End Property
Public Property TheDate As DateTime
Get
Return _TheDate
End Get
Set (ByVal value As DateTime)
_TheDate = value
End Set
End Property
'// I typed this in the message so this statement might
'// not be formatted correctly
Public Overrides Function ToString() As String
Return String.Format("{0} {1}", Me.Label, Me.TheDate)
End Function
End Class
//////////////
Then you could just store these objects in any sort of IEnumerable
field (array, list, arraylist, etc) and then when you pull them out of
the array (or whatever) and call the .ToString() method, you will get
the string like you requested.
Thanks,
Seth Rowe [MVP]