How to get the value of a HTML select box/picklist in Ranorex

C# Code

/// <summary>
/// Gets value of a select box (picklist).
/// Handles cases where the option tags and values are different.
/// </summary>
/// <param name="picklist">Picklist</param>
public string GetPickListValue (SelectTag pickList)
{
	for (int i=0; i < pickList.Options.Count ; i++ ) {
		if (pickList.Options[i].Selected == true) {
			return pickList.Options[i].Value;
		}
	}
	return "";
}