Returns the ID for the specified object, generating a new one if this object has not been 'seen' already by the ObjectIDGenerator in its lifetime.
[Visual Basic] Overridable Public Function GetId( _ ByVal obj As Object, _ ByRef firstTime As Boolean _ ) As Long [C#] public virtual long GetId( object obj, ref bool firstTime ); [C++] public: virtual __int64 GetId( Object* obj, bool** firstTime ); [JScript] public function GetId( obj : Object, firstTime : Boolean ) : long;
The object's ID used for serialization. firstTime is set to true if this is the first time that this particular object has been seen; otherwise, it is set to false.
Exception Type | Condition |
---|---|
ArgumentNullException | The obj parameter is a null reference (in Visual Basic Nothing). |
ObjectIDGenerator Class | ObjectIDGenerator Members | System.Runtime.Serialization Namespace