简化后代码:
if(A.ToString() == "A" || A.ToString() == "B" || A.ToString() == "C")
简化后代码:
if (new[] { "A", "B", "C" }.Contains(A.ToString()))
2021-11-30 20:25:33
简化后代码:
if(A.ToString() == "A" || A.ToString() == "B" || A.ToString() == "C")
简化后代码:
if (new[] { "A", "B", "C" }.Contains(A.ToString()))