EntryID

GenericObject.EntryID
The EntryID value is one of the most common values used to identify objects and units. The EntryID for the LocalPlayer object Me is always zero.

The EntryID of something such as a UnitObject are commonly used on sites such as WoWHead and can be found at the end of the object page URL. (E.G: http://www.wowhead.com/npc=892).

Example
// Print the name + EntryID of every unit currently loaded. foreach (UnitObject unit in Units) Print(unit.Name + " - " + unit.EntryID);

// Example output: // ... // Skaggit - 88637 // Senior Peon II - 84806 // Nalya Battlehorn - 88635 // Warmaster Zog - 79740 // Trader Darakk - 95471 // Command Table - 85805 // High Overlord Saurfang - 89753 // ...