I have a Dictionary<int, string>
which I want to take the Key collection into a CSV string.
I planned to do:
String.Join(",", myDic.Keys.ToArray().Cast<string[]>());
The cast is failing though.
Thanks
How about this...
String.Join(",", myDic.Keys.Select(o=>o.ToString()).ToArray());
This will work:
String.Join(",", myDic.Keys.Select(i => i.ToString()).ToArray());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With