Tab separated string split in C# -
there several stackoverflow question posted none of them works me.
i have string say
string str = "15.24\t7.28\t6.04\t5.0";
in app.config, define key value
<add key="delimiter" value="\t"/>
in program, have this
string delimiter = configurationmanager.appsettings["delimiter"]; string[] parsedvalues = str.split(delimiter.tochararray());
while debugging find delimiter gets changed "\t" , doesn't split string.
i have tried changing app.config
<add key="delimiter" value=@"\t"/>
but gives error.
even following gives error.
<add key="delimiter" value='\t' />
any appreciated.
try replacing \t 	
in config file. in xml files tab character represented 	
.
Comments
Post a Comment