I have a collection I want to transform into a dictionary. Here's the code:
myCollection.ToDictionary(item => item.Split('=')[0], item => item.Split('=')[1]);
Being the collection something like:
{"a=312d","b=dw234","c=wqdqw3=3")
The problem comes at the third object. As you can see, it has a second equal inside of it. This one, and all the character after it, are also part of the value (in the dictionary it should be c:wqdqw3=3). But, as you can imagine, I'm getting something like this in my dictionary a:312d, b:dw234, c:wqdqw3.
How could you change it so that the value of the dictionary was, for each element of the collection, everything that comes after the first '='?