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

  • Home
  • SEARCH
  • 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 9143207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:57:56+00:00 2026-06-17T09:57:56+00:00

This should be really easy but I’m having some trouble so I thought it’d

  • 0

This should be really easy but I’m having some trouble so I thought it’d be great to get some help.

  • 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-06-17T09:57:57+00:00Added an answer on June 17, 2026 at 9:57 am

    Assuming your array is an array of Int32…

    using (var stream = File.Create("file.xml")) {
        var serializer = new XmlSerializer(typeof(Int32[]));
        serializer.Serialize(stream, someArrayOfInt32);
    }
    

    Will create a simple XML file that is very easy to understand/modify. To deserialize it, use the Deserialize method.

    In JSON format :

     using System;
     using System.Collections.Generic;
     using System.Linq;
     using System.Web;
     using System.Runtime.Serialization.Json;
     using System.IO;
     using System.Text;  
     /// <summary>
     /// JSON Serialization and Deserialization Assistant Class
     /// </summary>
     public class JsonHelper
     {
         /// <summary>
         /// JSON Serialization
         /// </summary>
         public static string JsonSerializer<T> (T t)
         {
             DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(T));
             MemoryStream ms = new MemoryStream();
             ser.WriteObject(ms, t);
             string jsonString = Encoding.UTF8.GetString(ms.ToArray());
             ms.Close();
             return jsonString;
         }  
         /// <summary>
         /// JSON Deserialization
         /// </summary>
         public static T JsonDeserialize<T> (string jsonString)
         {
             DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(T));
             MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonString));
             T obj = (T)ser.ReadObject(ms);
             return obj;
         }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like it should be really easy but I've been having trouble with
This should be really easy but for some reason it doesn't seem to be.
This feels like it should be really easy, but I just can't get it
This seems like it should be really easy but I couln't find an answer
This should be really easy but I am struggling. Here is my current code
Ok, this should be really easy, but I just don't have enough experience. I
This is a really easy question, but I can't figure out what I should
This should be really easy, but I'm just not seeing how to do it.
This should be a really easy derp question, but here it is: I'm trying
This really should be easy, but I just can't work it out myself, the

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.