ScoreObjectMethodsGetScoreT(ListIScoreObject, String, UInt16) Method

Retrieves the score of type T for the given key and userID.

Definition

Namespace: Alteruna.Scoreboard
Assembly: Alteruna.Trinity (in Alteruna.Trinity.dll) Version: 1.3.4
C#
public static T GetScore<T>(
	this List<IScoreObject> scoreList,
	string key,
	ushort userID
)
where T : struct, new(), IConvertible

Parameters

scoreList  ListIScoreObject
The array of IScoreObjects to search.
key  String
The key of the score object.
userID  UInt16
The userID for which the score is to be retrieved.

Type Parameters

T
The type of the score to retrieve.

Return Value

T
The score of type T.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ListIScoreObject. 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