📅  最后修改于: 2022-03-11 14:49:19.129000             🧑  作者: Mango
switch (value)
{
case var s when new[] { 1,2,3 }.Contains(s):
// Do something
break;
case var s when new[] { 4,5,6 }.Contains(s):
// Do something
break;
default:
// Do the default
break;
}