这是我从 csv 得到的字符串:
string input = "Volume,447,\"4,325\",142,144";
我想要在我的数组行中:
447
4,325
142
144
我尝试了什么:
string[] volumes;
if (input.Contains(",\"")) // if they're all double value, it works
volumes = input.Split(new[] {",\""}, StringSplitOptions.None);
else
volumes= input.Split(','); // if they're all integer value it works
else
// what to do if they have both double and integer?