By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

[Serializable] attribute gives 'Declaration expected' squiggly

P: n/a
I'm binding a datagrid to my business object. I get an error that the type
'abcshoppingcart'...is not marked as serializable.

So, I added a [Serializable] attribute in the class. But then a blue
squiggly appears with 'declaration expected'. Any idea why?

[Serializable]
Public Class abcshoppingcart
Public customer As New abccustomer
Public product As New List(Of abcproduct)

Public Sub New()
' constructor
End Sub
......
Aug 19 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
FYI: Do it this way....

<Serializable()Public Class xxxxxx

"Cirene" <ci****@nowhere.comwrote in message
news:OW**************@TK2MSFTNGP05.phx.gbl...
I'm binding a datagrid to my business object. I get an error that the
type 'abcshoppingcart'...is not marked as serializable.

So, I added a [Serializable] attribute in the class. But then a blue
squiggly appears with 'declaration expected'. Any idea why?

[Serializable]
Public Class abcshoppingcart
Public customer As New abccustomer
Public product As New List(Of abcproduct)

Public Sub New()
' constructor
End Sub
.....

Aug 19 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.