关于字符串数组的一个疑惑,忘解答,,
如题,现在我有几行代码是这样的,
string file = Request["XXX"] == null ? "" : Request["XXX"];string[] filePath = (file.IndexOf(',') > -1) ? file.Split(',') : {file};
string file = Request["XXX"] == null ? "" : Request["XXX"];string[] test = { file };string[] filePath = (file.IndexOf(',') > -1) ? file.Split(',') : test;