title: Verifying application state using checksum at runtime
body: <p>A checksum is common way to make sure that a file's integrity isn't compromised. What I need is an integrity check not on a file but on the application state in a C# application. Think of a instance of a class that I want to instantiate and manipulate on physically seperate machines under the assumption that - as long as the checksum remains the same - the state of the instance is identical on all machines, too. The class instance may contain several fields or collections of other classes, some public but most private, so it's not trivial and the object hierarchy (amount of objects in the collections etc) will change at runtime.</p>
  
  <p>Is there a better way than serializing the relevant object-hierarchy into a memory stream which then is passed to a standard checksum algorithm?</p>