c# - String Replace For Insert -



c# - String Replace For Insert -

this question has reply here:

string.replace (or other string modification) not working 4 answers

i have application reads file , inserts contents of file table. split info substrings respective of fields. 1 of fields, need replace character (f) 0. have tried this, isn't working (f still beingness inserted).

string[] mylines02 = system.io.file.readalllines(@"c:\\billingexport\\imports\\acntbill.all.type02.frmated.txt"); list<account_bill_plans> table2_1input = new list<account_bill_plans>(); account_bill_plans table2_1 = new account_bill_plans(); (int = 0; < mylines02.length; i++) { var fixf_over = mylines02[i].substring(64, 3).trim().tostring(); if (fixf_over.contains("f")) { fixf_over.replace("f", "0"); } table2_1input.add(table2_1); using (sqlcommand cmd72 = new sqlcommand(insertstring72, _cond2)) { cmd72.parameters.add("@overpayment_limit", sqldbtype.nchar); cmd72.parameters["@overpayment_limit"].value = fixf_over; cmd72.executenonquery(); _cond2.close(); }

apply variable?

fixf_over = fixf_over.replace("f", "0");

c# sql

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -