我有这个字符串
string sx="(colorIndex=3)(font.family=Helvetica)(font.bold=1)";
我正在使用“分割”的方法对其进行拆分
string [] ss=sx.Split(new char[] { '(', ')' },
StringSplitOptions.RemoveEmptyEntries);
那么,我该如何将结果分割成一个Dictionary<string,string>
呢?得到的字典应该是这样的:
Key Value
colorIndex 3
font.family Helvetica
font.bold 1
s.Split()
两次的方法? - Dmitri Nesteruk