cannot convert from 'string' to 'char[]' for split

前端 未结 7 1842

I am using the following code to split a string:

string sss=\"125asdasdlkmlkdfknkldj125kdjfngdkjfndkg125ksndkfjdks125\";

List s = new List<         


        
7条回答
  •  伪装坚强ぢ
    2020-12-11 01:42

    This confused me for a long time. Finally I realised that I had used double instead of single quotes. In other words, I had x.Split(",") rather than x.Split(',').

    I changed to single quotes and it worked for me.

提交回复
热议问题