String.Split - How to calculate slot


look im new in programming, would be awesome if u could help me.

Im reading a whole .csv File with this:

[code]private void button3_Click(object sender, EventArgs e)
var content = string.Empty;
using (StreamReader reader = new StreamReader(@C:/1.csv, System.Text.Encoding.Default))
content = reader.ReadToEnd();

content = content.Replace(""", string.Empty);
content = content.Replace(" ", "");
content = content.Replace(" ", "");

using (StreamWriter writer = new StreamWriter(@C:/2.csv))

1.CSV Input looks like this:

" 09000";"Catalaog 1";10148;234
" 09001";"Catalaog 2";0;345

2.CSV Outlooks like this:

09000~Catalaog 1~10148~234
09001~Catalaog 2~0~0

I need a rewrite of my Code that the last delimited Columns 10148~234 get calculated.

String must look like this at the end:

09000~Catalaog 1~9914~234
09001~Catalaog 2~0~0

See the diffrence? The 10148 - 234 = 9914. The 10148 gets replaced with the result.

Could u rewrite my upper code and help me ?:<
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!