[Solved] How to truncate string value in c#? [closed]


Ok, I will take a guess at the logic rules. How about:

 string newStr = str.Substring(0,4)+str.Substring(10,4)+str.Substring(15,6);

or maybe you want

 string newStr = str.Substring(0,4)+str.Substring(10,4)+str.Split("-")[1];

there are many things you could want

3

solved How to truncate string value in c#? [closed]