I often use lookup values for various conditions, and have to check for those conditions in my code in order to perform some action. Welcome the enum:
strControlType = ((enmControlType)int.Parse(drTempDataRow["ControlTypeID"].ToString()));
switch (strControlType)
{
case enmControlType.ListBox:
..some action..
break;
}
Short but sweet...
No comments:
Post a Comment