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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:27:51+00:00 2026-05-29T16:27:51+00:00

I’m using an XmlSerializer to deserialize some XML into an object. The problem i’m

  • 0

I’m using an XmlSerializer to deserialize some XML into an object. The problem i’m having is once i’ve deserialized successfully, one of my properties which is an array has the property isFixedSize set to true.

I need to add to this array manually at a later stage, but can’t.

Here’s my object (other properties omitted for brevity)

namespace Omeda.Customer
{
    [Serializable()]
    [XmlRoot("Customer")]
    public class Customer : Error
    {
        [XmlArray("CustomerDemographics")]
        [XmlArrayItem("CustomerDemographic", typeof(CustomerDemographic))]
        public Omeda.Customer.CustomerDemographic[] CustomerDemographics { get; set; }
    }
}

And here’s the method I’m using to deserialize (again, code ommitted for brevity)

private T request_Get<T>(string url) where T : new()
{
    object returnObject = new T();

    try
    {
        var request = WebRequest.Create(url);
        request.Method = "GET";
        request.ContentType = "text/xml";
        request.Headers.Add("x-omeda-appid", this.API_KEY);
        request.Timeout = 50000;

        using (var response = request.GetResponse())
        {
            using (var responseStream = response.GetResponseStream())
            {
                XmlSerializer serializer = new XmlSerializer(typeof(T));
                returnObject = (T)serializer.Deserialize(responseStream);
            }
        }
    }
    catch (WebException ex)
    {
        ...
    }

    return (T)returnObject;
}

Once this object is returned, customer.CustomerDemographics.IsFixedSize returns true.

Any help on how to get round this, and why this is happening would be great.

  • 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-29T16:27:52+00:00Added an answer on May 29, 2026 at 4:27 pm

    IsFixedSize is always true for an array. If you “need to add to this array manually at a later stage”, you should not be using an array; you should probably be using a List<CustomerDemographic>, or another collection type that can be grown.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am currently running into a problem where an element is coming back from
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm making a simple page using Google Maps API 3. My first. One marker
I am reading a book about Javascript and jQuery and using one of the
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.