string[] tokens = str.Split(new[] { "is Marco and" }, StringSplitOptions.None);
If you have a single character delimiter (like for instance ,
), you can reduce that to (note the single quotes):
string[] tokens = str.Split(',');
More Related Contents:
- Split and cut string in C# [closed]
- Easiest way to split a string on newlines in .NET?
- Split a string by another string in C#
- C# Splitting Strings?
- Split a string with delimiters but keep the delimiters in the result in C#
- Splitting a string / number every Nth Character / Number?
- Split a string with delimiters but keep the delimiters in the result in C#
- Split string into string array of single characters
- split a string on newlines in .NET
- How to extract decimal number from string in C#
- Get values between curly braces c#
- Splitting a string in C#
- splitting a string based on multiple char delimiters
- Find index of returned list result C#
- In C#, why is String a reference type that behaves like a value type?
- C# string reference type?
- byte[] to hex string [duplicate]
- C# List to string with delimiter
- What is the difference between a mutable and immutable string in C#?
- Verifying that a string contains only letters in C#
- How to compare Unicode characters that “look alike”?
- How can I create a more user-friendly string.format syntax?
- Get Substring – everything before certain char
- string.Format() giving “Input string is not in correct format”
- How does one extract each folder name from a path?
- How to do Alignment within string.Format in C#?
- Really simple short string compression
- Formatting a string into columns using String Interpolation
- Regular expression to split string and number
- what’s the use of string.Clone()?