It depends on whether you want to expose it as a dictionary or not. If you want to expose the entire dictionary object then you just make it a normal property. This is the easiest way to go about things because you only have to write a single property and you get all of the functionality associated with a dictionary object.
If you want to protect the dicationary from being exposed directly then you can create methods off your business object that operate on the dictionary. This is a bit harder because you have to consider everything that someone may want to do with the dicationary (add, remove, etc). But it does give you more control over how the dictionary is used.
If you were looking for syntax, it should be something like this:
Private _notes As Dictionary(Of Date, String)
Public Property Notes() As Dictionary(Of Date, String)
Get
If _notes Is Nothing Then _notes = New Dictionary(Of Date, String)()
Return _notes
End Get
Set(ByVal value As Dictionary(Of Date, String))
_notes = value
End Set
End Property
Damon Armstrong, Technology Consultant
[
Blog] [
Articles]