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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:11:34+00:00 2026-05-12T23:11:34+00:00

I just updated to r275 version and it doesn’t seem to manage correctly DataContract

  • 0

I just updated to r275 version and it doesn’t seem to manage correctly DataContract classes any more
By serializing this very simple class:

[DataContract]
public class ProtoData
{
    [DataMember(Order = 1)]
    private long _id;
    [DataMember(Order = 2)]
    private string _firstName;
    [DataMember(Order = 3)]
    private string _lastName;

    public long Id
    {
        get { return _id; }
        set { _id = value; }
    }

    public string FirstName
    {
        get { return _firstName; }
        set { _firstName = value; }
    }

    public string LastName
    {
        get { return _lastName; }
        set { _lastName = value; }
    }

    public ProtoData(long id, string firstName, string lastName)
    {
        _id = id;
        _firstName = firstName;
        _lastName = lastName;
    }

    public ProtoData()
    {
    }

I get Only data-contract classes (and lists/arrays of such) can be processed (error processing ProtoData)

  • 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-12T23:11:34+00:00Added an answer on May 12, 2026 at 11:11 pm

    Really? that is…. odd; I would have expected the unit tests to spt such a breaking change. Are you sure you are using the right version? There is a 2.0 version (which doesn’t include [DataContract] support, since this is in WCF, a 3.0 extension) and a separate 3.0 version. You want the 3.0 version (NET30.zip).

    Tested successfully with r275/NET30:

    static void Main() {
        ProtoData pd = new ProtoData {
            FirstName = "Marc",
            LastName = "Gravell",
            Id = 23354
        }, clone;
        using (MemoryStream ms = new MemoryStream()) {
            Serializer.Serialize(ms, pd);
            Console.WriteLine(ms.Length);
            ms.Position = 0;
            clone = Serializer.Deserialize<ProtoData>(ms);            
        }
        Console.WriteLine(clone.FirstName);
        Console.WriteLine(clone.LastName);
        Console.WriteLine(clone.Id);
    }
    

    With output:

    19
    Marc
    Gravell
    23354
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just updated albacore to version 0.14 and ran into a major problem. My current
I just updated my ruby version and now when I run irb in command
I just updated my Xcode to the latest version and am trying to run
I just updated Xcode to version 4.3 via the Mac App Store last week,
I just updated to Rails 3.2 and I started to get errors like this:
I just updated to the newest version of jtidy which came out in october
Just updated the version of Ruby (1.9.2 to 1.9.3) I have installed but now
I just updated my joomla from 1.0.12 to 1.5 but the component remository doesn't
I've just updated to Rails 2.3.11. In an earlier version I could write the
I just updated the jQuery Mobile version of our client book-in page to 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.