Parse one String data using C#

Posted by skumar on Stack Overflow See other posts from Stack Overflow or by skumar
Published on 2012-06-17T08:50:03Z Indexed on 2012/06/17 9:16 UTC
Read the original article Hit count: 201

Filed under:
|
|

I need to parse the following string data and convert it into the specified C# class object. Please suggest me a solution for this:

Input string: A||B||C Output: Class containing a list of 3 objects of type string i.e A, B, C

Input String: A||{a1||a2||a3}||B||C Output: Class containing a list of 3 elements i.e A, B, C and inside A having one more List with 3 elements i.e a1, a2, a3. Here elements inside brace symbol { .. } would represent the child elements.

Note: Child elements could have again multiple child elements.

Please help me on this.

© Stack Overflow or respective owner

Related posts about c#

Related posts about string