hi , hope the below codesnippet will satisfy your needs string s ="123456"; int total=0; for(int i =0 ; i <s.Length ;i++> ) { int m = Convert.ToInt32(s[i].ToString()); total += m; } Thanks Saravanan R
S
saravanan_raju
@saravanan_raju
hi , hope the below codesnippet will satisfy your needs string s ="123456"; int total=0; for(int i =0 ; i <s.Length ;i++> ) { int m = Convert.ToInt32(s[i].ToString()); total += m; } Thanks Saravanan R