Click or drag to resize

EntityExtensionsHandleOrDefault Method

Returns the handle of the entity or the specified default value if the entity is empty.

Namespace:  SampSharp.Entities
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public static int HandleOrDefault(
	this EntityId entity,
	int default
)

Parameters

entity
Type: SampSharp.EntitiesEntityId
The entity to get the handle of.
default
Type: SystemInt32
The default value to return if the specified entity is empty.

Return Value

Type: Int32
The handle of entity or the specified default value if the entity is empty.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type EntityId. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also