public string ReturnMethod(int x){ return x switch { 2 => "2", 3 => "3", _ => "default" //_ 代表switch中的default };}
No comments:
Post a Comment