do case

Joe

Administrator
Staff member
FoxPro:
do case
case Upper(lcTableName) = "TABLE1"
    ...
case Upper(lcTableName) = "TABLE2"
    ...
case Upper(lcTableName) = "TABLE3"
    ...
case Upper(lcTableName) = "TABLE4"
    ...
otherwise
    ...
endcase
C#:
if(TableName.ToUpper() == "TABLE1")
    {...}
else if (TableName.ToUpper() == "TABLE2")
    {...}
else if (TableName.ToUpper() == "TABLE3")
    {...}
else if (TableName.ToUpper() == "TABLE4")
    {...}
else
    {...}
 
Last edited:
Top