Parsing a comma-separated list
Posted
by alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-05-13T07:15:42Z
Indexed on
2010/05/13
7:24 UTC
Read the original article
Hit count: 221
I have a comma-separated list of values, for example:
strins s = "param1=true;param2=4;param3=2.0f;param4=sometext;";
I need a functions:
public bool ExtractBool(string parameterName, string @params);
public int ExtractInt(string parameterName, string @params);
public float ExtractFloat(string parameterName, string @params);
public string ExtractString(string parameterName, string @params);
Is there a special functions in .net that can help me with csl ?
PS: parameter names are equal within a list.
© Stack Overflow or respective owner