A string that contains date and integer in specific format: MM/dd/yyyy (Number)
string strData = "01/23/2017 (5); 01/16/2017 (2);01/24/2017 (6);01/16/2017 (5);01/23/2017 (10)";
Based on above I want following:
- Add Number if date is similar
- Sorting should be based on date i.e. Ascending
Expected Output:
strData = "01/16/2017 (7);01/23/2017 (15);01/24/2017 (6)";
I know it is possible, if we split on the basis of semicolon and then traverse values using 'for-loop'.
But please suggest me linq solution.