I have a string CHF,2$DVC,1$PP,4 and i want result as this
List
CHF
DVC
PP
Sum: 7
i can do it by spliting with '$', then apply foreach loop then again split with ',' and apply foreach loop.
On google i found that
if i had string like string myString = "1,2,4,8,16";
the i can get the sum with .Sum(x => int.Parse(x)) but don't know how to implement in my case
Can anybody tell me how can i get desired result using linq without loop as i am new in linq