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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:49:26+00:00 2026-05-21T15:49:26+00:00

I’m looking at hashing an object model, based on a serialization of it. If

  • 0

I’m looking at hashing an object model, based on a serialization of it.

If I serialize an object graph using the .NET BinaryFormatter, is the serialized representation guaranteed to be the exact same, byte for byte, for another object graph where all the involved objects are composed of the same values?

Intuitively, I’d think so, but I’m unsure if object/reference IDs might somehow influence the actual serialized representation.

Thanks in advance.

  • 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-21T15:49:27+00:00Added an answer on May 21, 2026 at 3:49 pm

    I do not know that is guaranteed, and with the lack of a documented guarantee I would not personally rely on it. In particular:

    • anything that implements ISerializable (i.e. custom serialization) can do whatever it wants
    • anything involving something like a dictionary may be unreliable – simply because there is no defined ordering inside a dictionary, and it may depend on the spare space in the original vs reconstituted, etc
    • there may be subtle compatible but not identical changes between platforms, revisions etc

    However, if you are talking about binary equivalence, I deduce you are talking about storage of BinaryFormatter data, and subsequent comparison at a later date. Allow me to stress: IMO, BinaryFormatter is not suitable for storage; it is OK (ish) for transport of data between running systems that share a platform and application version, but the sheer number of times I’ve seen people stuck in a hole due to version differences and BinaryFormatter is overwhelming. It is for these reasons that I got interested in protobuf, and wrote my own serializer that would be suitable for storage and rehydration against existing object models that make have “versioned” in the interim.

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

Sidebar

Related Questions

I'm looking for suggestions for debugging... If you view this site in Firefox or
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am using Paperclip to handle profile photo uploads in my app. They upload

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.