IndexOf
Namespace: Digi21.DigiNG.IO
Assembly: Digi21.DigiNG
Returns an entity's position in the drawing file.
int IndexOf(Entity entity);
| Parameter | Description |
|---|---|
entity |
Entity to find. |
Return value
int: zero-based entity position among the file's entities. Deleted entities also count. Returns -1 in these cases:
- The entity does not belong to any file (
Ownerisnull). - The entity belongs to another file (
Owneris another object). - The entity belongs to this file but is not among the entities the file has in memory.
Exceptions
| Exception | When |
|---|---|
NullReferenceException |
entity is null. Implementations do not check whether the parameter is null. |