That will work, but that's the old school way of doing it. These days, CodeLab can use enums, so you don't have to deal with byte values and casting.
#region UICode
ListBoxControl<CurveTypes> curveType = CurveTypes.Bezier; // Type of Curve|Bezier|Closed Bezier|Curve|Closed Curve|Straight Lines|Closed Straight Lines
#endregion
enum CurveTypes
{
Bezier,
ClosedBezier,
Curve,
ClosedCurve,
StraightLines,
ClosedStraightLines
}