Hi,
I'm trying to make Shoppingcart serializable as XML instead of Binary. Just for knowledge. I tryed to implement a class from Icollection this way:
Sorry (
VB Code)
Public Class ShoppingCartItemCollection
Implements ICollection
Dim _temparray() As ShoppingCartItem
Public Sub CopyTo(ByVal array As System.Array, ByVal index As Integer) Implements System.Collections.ICollection.CopyTo
Throw New ApplicationException("Method not implmented yet")
End Sub
Public ReadOnly Property Count() As Integer Implements System.Collections.ICollection.Count
Get
Return _temparray.Length
End Get
End Property
Public ReadOnly Property IsSynchronized() As Boolean Implements System.Collections.ICollection.IsSynchronized
Get
Return False
End Get
End Property
Public ReadOnly Property SyncRoot() As Object Implements System.Collections.ICollection.SyncRoot
Get
Return Me
End Get
End Property
Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
_temparray.GetEnumerator()
End Function
End Class
Then I tried set Items property:
Public ReadOnly Property Items() As ShoppingCartItemCollection
Get
Return _items.Values
End Get
End Property
But Values and ShoppingCartItemCollection are not compatible. Also, I'm not sure if i'm focusing well.
Some kind of help will be appreciated.
Thnx