フレームワークについて学び始めましserialization
た.NET
が、カスタム コレクションまたはカスタム クラス オブジェクトのいずれかを返すプロパティに対して何をすべきかを見つけることができませんでした。以下の例では、私のItems
プロパティはカスタム コレクションを返します。そのクラスにも「datacontract」属性を追加する必要がありますか?
また、いずれかのプロパティがカスタム クラス タイプを返す場合に少し変更するには、それらのすべてのクラスをdatacontract
(datamembe
プロパティがある場合は r で)マークする必要があります。
<DataContract()> Public NotInheritable Class MyMainClass
Private pFilters As MyCustomClass
<DataMember()> Public ReadOnly Property Items As MyCustomCollection
Get
Return pFilters
End Get
End Property
Public Class MyCustomCollection
'Stuff in here
End Class
End Class