Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description

The Switch statement operator is an extended version of the IF ("If ... then ..." condition).

...

Expand
titleFor those who want to work with C # code

You can implement similar functionality via C # C # code (C sharp code .net)

Sample code for the option above

Code Block
languagec#
string switch_var = project.Variables ["switch_test"]. Value;
switch (switch_var) {
case "A": 
project.SendInfoToLog ("ВThe variable переменнойcontains заключенаthe букваletter A", true);
break;
case "B":

project.SendInfoToLog ("ВThe variable переменнойcontains заключенаthe букваletter B", true);
break;
case "C":

project.SendInfoToLog ("ВThe variable переменнойcontains заключенаthe букваletter C", true);
break;
case "D":

project.SendInfoToLog ("ВThe variable переменнойcontains заключенаthe букваletter B", true);
break;
case "E": 
project.SendInfoToLog ("ВThe variable переменнойcontains заключенаthe букваletter E", true);
break;
default:
project.SendInfoToLog ("НеNecessary match обнаруженоwas нужноеnot соответствиеfound, значениеvariable переменнойvalue: " + project.Variables ["switch_test"]. Value, true);
break;
}