可能性の重複:
How do I split a string by a multi-character delimiter in C#?文字列区切り文字で文字列を分割するにはどうすればよいですか?
私はこの文字列を持っている:
My name is Marco and I'm from Italy
私は区切り文字is Marco and
と、それを分割したいと思いますので、私は、配列を取得する必要があります
-
[0]で
My name
と[1]でI'm from Italy
です。
C#でどうすればいいですか?
は
.Split("is Marco and")
にしようとしたが、それは、単一の文字を望んでいます。
[この](http://stackoverflow.com/questions/1126915/how -do-i-split-a-string-by-a-multi-character-delimiter-in-c)が以前に尋ねられました。 –
関連するhttps://stackoverflow.com/questions/315358/c-sharp-syntax-split-string-into-array-by-comma-convert-to-generic-list-and – barlop