On Jun 21, 2:11 pm, "Kevin Spencer" <unclechut...@nothinks.comwrote:
You can use a structure, certainly. However, private members of classes and
structures are not serialized as XML.
--
HTH,
Kevin Spencer
Microsoft MVP
Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:http://www.miradyne.net
"shapper" <mdmo...@gmail.comwrote in message
news:11**********************@w5g2000hsg.googlegro ups.com...
Hello,
I have a class which I am using in my profile.
I made this class Serializable by using:
<Serializable()_
Public Class Options
One of the properties in this class is of type Level where level is a
structure:
Public Structure Level
Dim Delete As Boolean
Dim Create As Boolean
Dim Update As Boolean
Dim View As Boolean
End Structure ' Level
' Access
Private _Access As Level
Public Property Access() As Level
Get
Return _Access
End Get
Set(ByVal value As Level)
_Access = value
End Set
End Property ' Access
Can I make this?
I am not sure if I can use the structure as described since my class
is Serializable because of profile.
Should I turn Level into a Serializable class to with 4 properties?
Thanks,
Miguel
Hi,
I am serializing my profile classes as binary:
<add allowAnonymous = "false" name = "Collaborator" type =
"Collaborator" serializeAs = "Binary" />
And my class is as follows (I am using the <flagenum sugestion from
Gaurav):
<Serializable()_
Public Class Collaborator
' Permissions
Private _Permissions As Security
Public Property Permissions() As Security
Get
Return _Permissions
End Get
Set(ByVal value As Security)
_Permissions = value
End Set
End Property ' Permissions
' Security
<Serializable()_
Public Class Security
' Level
<Flags()Public Enum Level
Delete = 1
Create = 2
Update = 4
View = 8
End Enum ' Level
' Blogger
Private _Blogger As Level
Public Property Blogger() As Level
Get
Return _Blogger
End Get
Set(ByVal value As Level)
_Blogger = value
End Set
End Property ' Blogger
' Scheduler
Private _Scheduler As Level
Public Property Scheduler() As Level
Get
Return _Scheduler
End Get
Set(ByVal value As Level)
_Scheduler = value
End Set
End Property ' Scheduler
...
End Class ' Security
End Class ' Collaborator
Is this ok?
Thanks,
Miguel