0
Yes, it can be.
See an example here:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int num = 5;
if(num == 5){
Console.WriteLine(num + " from if");
switch(num){
case 2:
Console.Write("two from switch");
break;
case 5:
Console.Write("five from switch");
break;
default:
Console.Write("hello from switch");
break;
}
}
}
}
}