You don’t need arguments in GetMenuOption() and GetValue() methods. And here is loop (it is needed if you want to process more than one temperature) with switch:
while (true)
{
DisplayMenu();
var letter = GetMenuOption();
var fromString = String.Empty;
var toString = String.Empty;
if (letter == 'X')
{
break;
}
var fromValue = GetValue();
var result = 0;
switch (letter)
{
case 'C':
fromString = "F";
toString = "C";
result = process(fromValue);
break;
case 'F':
fromString = "C";
toString = "F";
result = process1(fromValue);
break;
case 'K':
fromString = "C";
toString = "K";
result = process2(fromValue);
break;
case 'R':
fromString = "C";
toString = "R";
result = process3(fromValue);
break;
}
PrintResult(fromValue, result, fromString, toString);
}
solved how will I access the methods into my Switch statement? [closed]