I’m quite new to Linq. I have something like this:
dict = fullGatewayResponse.
Split(',').ToDictionary(key => key.Split('=')[0], value => value.Split('=')[1])
This works fine but for obvious reasons I don’t want the split() method to be called twice.
How can I do that ?
Thanks for all your responses :), but I can only choose one.
You can convert each item to an array before
ToDictionaryby usingSelect: