ObjectIDGenerator::GetId Method (Object^, Boolean%)
.NET Framework (current version)
Returns the ID for the specified object, generating a new ID if the specified object has not already been identified by the ObjectIDGenerator.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- obj
-
Type:
System::Object^
The object you want an ID for.
- firstTime
-
Type:
System::Boolean%
true if obj was not previously known to the ObjectIDGenerator; otherwise, false.
Return Value
Type: System::Int64The object's ID is used for serialization. firstTime is set to true if this is the first time the object has been identified; otherwise, it is set to false.
| Exception | Condition |
|---|---|
| ArgumentNullException | The obj parameter is null. |
| SerializationException | The ObjectIDGenerator has been asked to keep track of too many objects. |
.NET Framework
Available since 1.1
Available since 1.1
Show: