Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7632167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:33:08+00:00 2026-05-31T06:33:08+00:00

I’m working in Windows Phone 7, but I suppose the question may be Silverlight

  • 0

I’m working in Windows Phone 7, but I suppose the question may be Silverlight in general (not .NET though, as ISerializable doesn’t exist in Windows Phone as suggested in this answer).

I have an number of objects I create at run time. They will mostly always be the same, except for a few properties.

So I would have as an object:

Public Class Article
    Public Property Title As String
    Public Property Author As String
    Public Property HasBeenViewed As Boolean
    Public Property DateViewed As Date
    Public Property IsPriorityArticle As Boolean
End Class

I’d like to be able to write this as:

<DataContract()>
Public Class Article
    <IgnoreDataMember()> _
    Public Property Title As String
    <IgnoreDataMember()> _
    Public Property Author As String
    <DataMember()> _
    Public Property HasBeenViewed As Boolean
    <DataMember()> _
    Public Property DateViewed As Date
    <DataMember()> _
    Public Property IsPriorityArticle As Boolean
End Class

I have a lot of article objects to load at startup. Note: Articles that are loaded at startup are the only articles – there are never any new articles or any articles deleted. The only things that are changed in the Article object is IsPriorityArticle, HasBeenViewed and DateViewed. The rest of it is static.

I load these articles into a List(Of Article) and that becomes my data source for binding. As the user views the articles, it logs when it was last viewed and that date. IsPriorityArticle may have a true or false value that can be changed by the user – the end user can mark if it is considered an important article (in which case it will show up in another page of priority articles) or to unmark it as false. If so, that new value needs to persist between sessions.

I have about 250 articles. I create these all on start up (again, there will never be more or less articles).

Initialized values sample:

Public Shared Property MyArticles As IEnumerable(Of Article)

Private Sub Application_Launching(ByVal sender As Object, ByVal e As LaunchingEventArgs)
    Dim listOfArticles As New List(Of Article)
    With listOfArticles
        .Add(New Article With {.Title = "The Internet", .Author = "John", _
                               .IsPriorityArticle = False})
        .Add(New Article With {.Title = "The World", .Author = "Jim", _
                               .IsPriorityArticle = False})
        .Add(New Article With {.Title = "The Universe", .Author = "John", _
                               .IsPriorityArticle = True})
        .Add(New Article With {.Title = "The Atom", .Author = "Jim", _
                               .IsPriorityArticle = True})
    End With
    MyArticles = listOfArticles
End Sub

(BTW, I know I don’t need the line continuation character anymore, but this site won’t format code without it)

Notice the last 2 – they have .IsPriorityArticle = True. That is the initialized value when the app is first launched – if the user never changes it, it will always be .IsPriorityArticle = True but if they change it to False, that should persist in IsolatedStorage to the next session.

So I’ve toyed around with trying to get this to serialize properly and can’t get anything to work. I don’t know how to load only the <DataMember> properties from IsoStore and not the rest.

Does anyone know how to do this so that my MyArticles As IEnumerable(Of Article) will use my initialized values and then check for any <DataMember> properties that need to be updated?

Or am I down the wrong path on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:33:09+00:00Added an answer on May 31, 2026 at 6:33 am

    It appears there is no way to partially serialize a class so that it uses some kind of JOIN wherein the serialized portion is attached to the newly created portion that didn’t need serializing. Serialization is of an instance of the class, not any instance of the class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This could be a duplicate question, but I have no idea what search terms
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I don't have much knowledge about the IPv6 protocol, so sorry if the question
Seemingly simple, but I cannot find anything relevant on the web. What is the
I need a function that will clean a strings' special characters. I do NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.