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 6009085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:55:13+00:00 2026-05-23T01:55:13+00:00

I have a Windows Phone application I am developing that needs to persist some

  • 0

I have a Windows Phone application I am developing that needs to persist some objects to IsolatedStorage. Isolated Storage is pretty handy in that you can just pop an object into in using a few lines of code.

I need a few more objects persisted where the type is different but the method of persisting is not. What I was going to do was simply cast my types to object, save them and when retrieving them cast back to the particular type needed.

Because of conventions used by the app I always know which cast to perform but I wonder if doing this would cause me to loose anything during the cast / recast of the object.

EDIT: I would like to point out that the comments have showed me that I was actually looking for generics without knowing that they solve my issue. I have upvoted everyone who suggested them as they took apart my question and found the crux of my dilemma. Thanks to all that suggested them.

  • 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-23T01:55:14+00:00Added an answer on May 23, 2026 at 1:55 am

    Generics is perfect for this scenario. There’s an example of how to create generic methods that read and write to an Isolated Storage here.

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

Sidebar

Related Questions

I'm developing a twitter application for Windows Phone 7 and have been doing some
I'm developing a Windows Phone application . I have defined this on App.xaml: <nav:UriMapping
I'm developing a Windows Phone application with C#. I have an ObservableCollection defined as
I have a Windows Phone 7 application (Silverlight-based) that sends a web request and
I am developing an Windows phone7 application, I have a .NET webservice that returns
I am developing a Windows Phone 7 Silverlight application that currently displays a map
Currently developing an application for Windows Phone that makes use of the bing maps
I have a Windows Phone 7 Application. I have one stackpanel control that hosts
Say you have a Windows Mobile 6.0 phone that also has a GPS receiver.
I have played around with smart phone development (windows ce), and it seemed pretty

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.