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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:21:42+00:00 2026-05-24T06:21:42+00:00

Until now, I only had to store application state of primitive types like int,

  • 0

Until now, I only had to store application state of primitive types like int, string, boolean and for that I used Properties.Settings.Default object with no problem.

But now I also need to store instances of classes created with new keyword.

So my question is how to store these types of objects?

  • 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-24T06:21:43+00:00Added an answer on May 24, 2026 at 6:21 am

    Serialize your object with XmlSerializer in that way:

    var p=new Person();
    p.FirstName = "Jeff";
    p.MI = "A";
    p.LastName = "Price";
    System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(p.GetType());
    x.Serialize(Console.Out, p);
    

    Source and full example: http://support.microsoft.com/kb/815813

    For the complete process – serializing and deserializing – visit this link:

    http://sharpertutorials.com/serialization/

    Notes:

    • you have to use the attribute [Serializable] (or other, it depends on the serializer) on your class
    • try using POCO objects
    • depending on your .NET version, consider toughts in this Codeproject article.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page in asp.net (web forms) that up until now only had
Until now, my project had only .cpp files that were compiled into different binaries
Until now I had only encountered this kind of types for a cv::Mat :
Untill now in C# MVC3 i only had to use one controller which used
Up until now I used DateTime.Now for getting timestamps, but I noticed that if
In ASP.NET we have until now only had one theme, which was specified in
Having until now only used PHP's gd image library to resize, crop and greyscale
Until now, I've been the only person who has had access to the editing
Until now I've been only writing console applications but I need to write a
Until now I've always used the ASP.NET MVC framework source for debugging ASP.NET MVC.

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.