标签:def switch pre -- 更新 lang code eth turn
public string ReturnMethod(int x)
{
return x switch
{
2 => "2",
3 => "3",
_ => "default" //_ 代表switch中的default
};
}
标签:def switch pre -- 更新 lang code eth turn
原文地址:https://www.cnblogs.com/boydenyol/p/12946029.html