The original string is:
Isi Voucher Regular 10K seharga Rp 10,400.00 pada 13/12/16 16:52 ke 6285811111111 SUKSES, Saldo: Rp 3,482,350.00, TID:0071272220111111111.
In the code you searh the
first "," with
int endIndex = strKeterangan.IndexOf(",", startIndex);
this find the "," inside 3,482,350.00
if you use
LastIndexOf to search the
last "," in the string with:
int endIndex = strKeterangan.LastIndexOf(",", startIndex);
you will find what you want