Remove text after a string occurrence

后端 未结 5 1033
温柔的废话
温柔的废话 2021-01-19 05:38

I have a string that has the following format:

string sample = \"A, ABC, 1, ACS,,\"

As you can see, there are 5 occurences of the ,

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 06:11

    Use the String.Substring method

    http://msdn.microsoft.com/en-us/library/system.string.substring(v=VS.100).aspx

提交回复
热议问题