O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ObjectIDGenerator

Synopsis

This class is used by formatters to identify objects within a serialized stream in order to track object references. The IDs are 64-bit numbers that are generated when an object is referenced or is referencing another. (An ID with a zero value is a null reference.) The GetId() method creates and returns an ID for an object if it does not already have one.

public class ObjectIDGenerator {
// Public Constructors
   public method ObjectIDGenerator();  
// Public Instance Methods
   public virtual method long GetId(object obj, 
        out bool firstTime);  
   public virtual method long HasId(object obj, 
        out bool firstTime);  
}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required